Skip to content
Snippets Groups Projects
Commit 87ace904 authored by Fabian Pedregosa's avatar Fabian Pedregosa
Browse files

Add a comment on inverting the sign of decision_function.

Thanks to Mathieu Blondel for the suggestion.
parent 443d91a0
Branches
Tags
No related merge requests found
...@@ -276,6 +276,9 @@ class BaseLibSVM(BaseEstimator): ...@@ -276,6 +276,9 @@ class BaseLibSVM(BaseEstimator):
self.support_, self.label_, self.probA_, self.support_, self.label_, self.probA_,
self.probB_) self.probB_)
# libsvm has the convention of returning negative values for
# rightmost labels, so we invert the sign since our label_ is
# sorted by increasing order
return -dec_func return -dec_func
@property @property
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment