DOC More notes about the difference between the three base scorers
@@ -449,6 +449,16 @@ def make_scorer(score_func, greater_is_better=True, needs_proba=False,
>>> from sklearn.svm import LinearSVC
>>> grid = GridSearchCV(LinearSVC(), param_grid={'C': [1, 10]},
... scoring=ftwo_scorer)
+
+ Notes
+ -----
+ If `needs_proba=False` and `needs_threshold=False`, the score
+ function is supposed to accept the output of `predict`. If
+ `needs_proba=True`, the score function is supposed to accept the
+ output of `predict_proba` (For binary `y_true`, the score function is
+ supposed to accept probability of the positive class). If
+ `needs_threshold=True`, the score function is supposed to accept the
+ output of `decision_function`.
"""
sign = 1 if greater_is_better else -1
if needs_proba and needs_threshold:
