In LIBSVM, the -b
flag in svmtrain
is used to enable training a SVC or SVR model for probability estimates. To get the corresponding results for the test set, we also set the -b
results in svmpredict
For example, in MATLAB, we would write the following code to train and test with probability estimates enabled:
model = svmtrain(train_labels, train_set, '-b 1')
[result, accuracy, prob] = svmpredict(test_labels, test_set, '-b 1')
However, when initializing the SVC in the scikit-learn library, we can only set the -b
flag when training, which would be the same as setting the -b
flag on svmtrain
:
clf = scikit.svm.SVC(probability=True)
For testing in scikit-learn, I am using clf.predict(test_set)
to get the classes. However, this yields different results then when I use svmpredict
with -b 1
flag.
What is the equivalent in scikit-learn svm for setting the -b
flag during testing with svmpredict
?