scikit-learn/scikit-learn — Issue #394: inconsist prediction from SVC in predict and predict_proba
Author: dawnrain
Created: 2011-10-12 18:53:12+00:00
State: open

Using the same set of training data, I trained a SVM with probability=False, and the other SVM with probability=True. Then I test both SVM model on the same test data, the output of these two SVM models are inconsistent, see the following output:

0.0 [ 0.81541963 0.18458037]
1.0 [ 0.73578213 0.26421787]
1.0 [ 0.74575504 0.25424496]
0.0 [ 0.92760444 0.07239556]
0.0 [ 0.86043918 0.13956082]
1.0 [ 0.69725339 0.30274661]
0.0 [ 0.81678065 0.18321935]
...

In the above results, the first column is the binary output from the SVM with probability=False, the same column enclosed by square parenthesis is the probabilistic outputs from the SVM with probability=True. If the first column in the square parenthesis is the probability for class 0, and the second column for class 1; this assumption is supported by row 1 but not true in row 2,3,etc.

Does anybody know what is the problem?