Solved – Can One-Class SVM be used for outlier detection

anomaly detectionone-classoutlierssvm

According to my readings (Support Vector Method for Novelty Detection, for instance), One-Class SVM can be used for novelty detection only. The purpose of the $\nu$ parameter is to defined the maximum proportion of outliers in the training data and this value is set by the user itself. I guess we can't talk about outlier detection in that case.

However, I was reading an issue on scikit-learn and one contributor explained OCSVM can be used for outlier detection and novelty detection.

So I want to know: how can we use OCSVM for outlier detection? Is it an unsupervised method as LOF or should I have a training and testing set?

Best Answer

In the following picture, you can see, there are two outliers, if some-how, we can fit a closed curve around blue dots, then we can detect the outliers. Now, how can we do that?

One simple approach is one-class-SVM

$$min_{R,C} |R|^2 + \dfrac{1}{\nu n}\sum_i\zeta_i$$ subject to $$||X-C||^2 <= R^2 + \zeta, \ \ \zeta_i >= 0$$

Intuition behind the objective function is that fit a circle, with optimal radius and center, with not many mistake. That can possibly eliminate those data-points that are very far from other(dense area).

Note: with the use of kernels, we can fit any curve instead of circle.

one-class-SVM

Related Question