class sklearn.svm.OneClassSVM(kernel=’rbf’, degree=3, gamma=’auto_deprecated’, coef0=0.0, tol=0.001, nu=0.5, shrinking=True, cache_size=200, verbose=False, max_iter=-1, random_state=None)
[source]
Unsupervised Outlier Detection.
Estimate the support of a high-dimensional distribution.
The implementation is based on libsvm.
Read more in the User Guide.
Parameters: |
|
---|---|
Attributes: |
|
decision_function (X) | Signed distance to the separating hyperplane. |
fit (X[, y, sample_weight]) | Detects the soft boundary of the set of samples X. |
fit_predict (X[, y]) | Performs outlier detection on X. |
get_params ([deep]) | Get parameters for this estimator. |
predict (X) | Perform classification on samples in X. |
score_samples (X) | Raw scoring function of the samples. |
set_params (**params) | Set the parameters of this estimator. |
__init__(kernel=’rbf’, degree=3, gamma=’auto_deprecated’, coef0=0.0, tol=0.001, nu=0.5, shrinking=True, cache_size=200, verbose=False, max_iter=-1, random_state=None)
[source]
decision_function(X)
[source]
Signed distance to the separating hyperplane.
Signed distance is positive for an inlier and negative for an outlier.
Parameters: |
|
---|---|
Returns: |
|
fit(X, y=None, sample_weight=None, **params)
[source]
Detects the soft boundary of the set of samples X.
Parameters: |
|
---|---|
Returns: |
|
If X is not a C-ordered contiguous array it is copied.
fit_predict(X, y=None)
[source]
Performs outlier detection on X.
Returns -1 for outliers and 1 for inliers.
Parameters: |
|
---|---|
Returns: |
|
get_params(deep=True)
[source]
Get parameters for this estimator.
Parameters: |
|
---|---|
Returns: |
|
predict(X)
[source]
Perform classification on samples in X.
For an one-class model, +1 or -1 is returned.
Parameters: |
|
---|---|
Returns: |
|
score_samples(X)
[source]
Raw scoring function of the samples.
Parameters: |
|
---|---|
Returns: |
|
set_params(**params)
[source]
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form <component>__<parameter>
so that it’s possible to update each component of a nested object.
Returns: |
|
---|
sklearn.svm.OneClassSVM
© 2007–2018 The scikit-learn developers
Licensed under the 3-clause BSD License.
http://scikit-learn.org/stable/modules/generated/sklearn.svm.OneClassSVM.html