title: Does one-class svm provide a probability estimate?
body: <p>I am using <a href="http://www.csie.ntu.edu.tw/~cjlin/libsvm/" rel="nofollow noreferrer">Libsvm</a> for outlier detection (from Java), but I need a probability estimate not just a label. I traced the code and found that this is not possible. In particular, in the function svm_predict_values(..) I see the following code: </p>
  
  <pre><code>if(model.param.svm_type == svm_parameter.ONE_CLASS)
          return (sum&gt;0)?1:-1;
  else
          return sum;
  </code></pre>
  
  <p>I understand that one-class SVM tries to estimate the support of some probability distribution given samples or data points from the "normal" class. Given a new data point, and given that the model has learned the support of the normal class distribution, can I get an estimate of the probability that a new data point is "normal" or an outlier?. It seems that this is not possible and that is why Libsvm thresholds the sum above and returns only a membership label, but I do not understand why. If it is possible to get a probability estimate from a one-class svm, I do not see how to do that in Libsvm after spending a lot of time reading the <a href="https://github.com/cjlin1/libsvm/blob/2fdc614c1526970b4412ba1db0cfcf772023ab61/java/libsvm/svm.java" rel="nofollow noreferrer">code</a>.</p>
  
  <p>The reason I went this rout is that I do not believe kernel density estimation would work well in a high dimensional setting, but maybe the svm is prone to the same issue.</p>