Closed tuomastik closed 5 years ago
Hi @tuomastik
Thanks for your feedback. Since you are using probability training (i.e., probability=True
), the probability prediction is not simply a comparison between decision value and 0. You can refer to line 277-299 of file "/src/model/svc.cpp". If you set probability=False
, you will find that decision_function() is the same with predict() in your code.
I see. Thank you. The issue can be closed.
It seems that in scikit-learn, the behavior of predict()
is unaffected by the probability
argument.
Just a gentle note: I think the current ThunderSVM scikit-learn wrapper interface is a little confusing to use, because not all of its methods function similarly to those of scikit-learn, which I believe many developers assume for a good reason. Similar functionality is especially important when working with estimators from different packages that all have the scikit-learn interface. Discrepancies lead developers to create their own workarounds such as the if-clause of dec_func_to_labels()
function in my code snippet above.
Thanks. Our goal is to be consistent with scikit. We'll try to figure out the difference between probability predictions and fix it.
Predictions of
predict()
differ from those ofdecision_function()
when alteringclass_weight
, while in scikit-learn those predictions are equal.The following code demonstrates the issue:
Output: