scikit-learn/scikit-learn — comment on commit 420eef15492d63c8d8483ad6b1207294a961c1ca
File:  line 0
By mblondel:

`LabelBinarizer` encodes the positive and negative labels with 1 and 0 respectively. This was not a problem with classifiers as they can handle any encoding as long as `neg_label < pos_label`. Hence, for classifiers, the decision threshold is always 0 when using `decision_function`. For regressors however, the decision threshold must be in the middle (0.5 here). Another fix would have been to do initialize the label binarizer with `LabelBinarizer(pos_label=1, neg_label=-1)` but this currently not possible. I opened issue #548 for that.