Solved – How to get probability from the confidence score in SVM

data mininglibsvmmachine learningsvm

In liblinear library we can get confidence score (the distance between decision hyperplane) in SVM solver for a binary classification problem, but if i want a probability value for membership in any class, which is not directly available in SVM in liblinear, is there any way to transform the confidence score into probability value? My question is just: Can we get a probability value in SVM rather than just 0-1 value? The platt scaling can do this in libsvm, but the platt scaling suffers theoretical issues, is there other way?because I want to calculate the AUC for measuring SVM's classifying performance.

Best Answer

SVMs do not produce probabilities, so you can not obtain a probability score from just an SVM.

If you want a valid probability score, use logistic regression. Since you are using lib linear, the difference in performance between a linear SVM and linear Logistic model is minimal, but the logistic model will actually have real probabilities.

Note, there are various "probability calibration" techniques that can be used, such as Platt's scaling. Some more info in a blog post of mine here.