Interpretation of scikit-learn one class svm scores How can I interpret the scores generated by the function score_samples(X) from a scikit-learn OneClassSVM model? Is there a way to tell when one sample is &quot;more anomalous&quot; than other? The predict() and decision_function() functions have sign information, yet the score_samples function does not have this.
from sklearn.svm import OneClassSVM

X = [[0], [0.44], [0.45], [0.46], [1]]
clf = OneClassSVM(gamma='auto').fit(X)

clf.predict(X)
# array([-1,  1,  1,  1, -1])

clf.score_samples(X)
# array([1.7798..., 2.0547..., 2.0556..., 2.0561..., 1.7332...])
```
The sample_scores values, along with a cutoff threshold value, are used to determine whether a value is an outlier or not. You should be careful if you try to compare these sample_score values to see which values may be more anomalous than others. If you are looking to eliminate outliers solely to eliminate them from your data-set, using this value alone on a outlier would not be reason enough to eliminate it.