Closed
Description
Reported at SO:
classifier = OneVsRestClassifier(SVC(class_weight='auto'))
classifier.fit(X1, y1)
y2 = classifier.predict(X2)
raises an exception because SVC.predict_proba
doesn't actually work unless probability=True
is passed.
Suggested fix: refactor the SVM code to introduce a new class, PlattSVC
, that functions like SVC(probability=True)
except that it uses probabilities for predict
and decision_function
also. Remove predict_proba
from SVC
. That would immediately fix the problem that SVC.predict_proba
is inconsistent with decision_function
and predict
.