Threshold for predictions from binary estimator.
(estimator)
| 116 | |
| 117 | |
| 118 | def _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 | |
| 127 | class _ConstantPredictor(BaseEstimator): |
no test coverage detected
searching dependent graphs…