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?


1 Answer 1


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.


  • $\begingroup$ 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? $\endgroup$
    – Pierre
    Dec 29, 2018 at 15:21
  • $\begingroup$ For tuning, we can use gridsearch method, available in sklearn. $\endgroup$ Dec 29, 2018 at 15:34
  • $\begingroup$ Which metric should I use in this case? I only used gridsearch for supervised learning. $\endgroup$
    – Pierre
    Dec 29, 2018 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.