MCPcopy
hub / github.com/scikit-learn/scikit-learn / _threshold_for_binary_predict

Function _threshold_for_binary_predict

sklearn/multiclass.py:118–124  ·  view source on GitHub ↗

Threshold for predictions from binary estimator.

(estimator)

Source from the content-addressed store, hash-verified

116
117
118def _threshold_for_binary_predict(estimator):
119 """Threshold for predictions from binary estimator."""
120 if hasattr(estimator, "decision_function") and is_classifier(estimator):
121 return 0.0
122 else:
123 # predict_proba threshold
124 return 0.5
125
126
127class _ConstantPredictor(BaseEstimator):

Callers 2

predictMethod · 0.85
predictMethod · 0.85

Calls 1

is_classifierFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…