Skip to content

Update description of OneClassSVM for outlier detection#17710

Closed
rubywerman wants to merge 1 commit intoscikit-learn:masterfrom
MLH-Fellowship:outlier
Closed

Update description of OneClassSVM for outlier detection#17710
rubywerman wants to merge 1 commit intoscikit-learn:masterfrom
MLH-Fellowship:outlier

Conversation

@rubywerman
Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fixes part of #3466

What does this implement/fix? Explain your changes.

This PR clarifies that One Class SVM can be used for outlier detection and novelty detection. Originally, the doc incorrectly suggested One Class SVM should only be used for novelty detection. I utilized the explanation on One Class SVM from here, which was already linked as an example.

Any other comments?

@rubywerman
Copy link
Copy Markdown
Contributor Author

@flosincapite

The :class:`svm.OneClassSVM` is known to be sensitive to outliers and thus
does not perform very well for outlier detection. Finally,
:class:`covariance.EllipticEnvelope` assumes the data is Gaussian and learns
does not perform very well for outlier detection. That being said, outlier detection in high-dimension, or without any assumptions on the distribution of the inlying data is very challenging. Thus, a :class:`svm.OneClassSVM` might give useful results in these situations depending on the value of its hyperparameters. Finally, :class:`covariance.EllipticEnvelope` assumes the data is Gaussian and learns
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you format your comment such that it fits 79 characters

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes - just linked a new PR fixing the comments you raised

The :class:`svm.OneClassSVM` is known to be sensitive to outliers and thus
does not perform very well for outlier detection. Finally,
:class:`covariance.EllipticEnvelope` assumes the data is Gaussian and learns
does not perform very well for outlier detection. That being said, outlier detection in high-dimension, or without any assumptions on the distribution of the inlying data is very challenging. Thus, a :class:`svm.OneClassSVM` might give useful results in these situations depending on the value of its hyperparameters. Finally, :class:`covariance.EllipticEnvelope` assumes the data is Gaussian and learns
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using might give results ... I would rather mention something along the line.
OneClassSVM might still be used with outlier detection but requires fine-tuning of its hyperparameter nu to handle outliers and not overfit those.

:target: ../auto_examples/neighbors/sphx_glr_plot_lof_novelty_detection.html
:align: center
:scale: 75%

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can avoid this change since this is not linked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants