# Can One-Class SVM be used for outlier detection?

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?

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.

• Can we talk about outlier detection in that case? Indeed, it's easy with 2 dimension data points to manually tune the $\nu$ parameter. But how to do that with n dimension data points? – Pierre Dec 29 '18 at 15:21
• For tuning, we can use gridsearch method, available in sklearn. – Ankish Bansal Dec 29 '18 at 15:34
• Which metric should I use in this case? I only used gridsearch for supervised learning. – Pierre Dec 29 '18 at 15:43