You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think make_scorer() should return _ThresholdScorer or _PredictProbaScorer object instead of _PredictScorer object when setting the response_method parameter because this bug is very easy to miss and most users might think make_scorer(metrics.roc_auc_score) and passing as 'roc_auc' will be the same.
Update: setting needs_threshold parameter in make_scorer() function will work properly.
Describe the bug
Related to #27977
Also applies to pr_auc metric.
When defining multi-metric scoring as a dictionary and passing to
cross_validate()
:the
roc_auc
is based on class labels (predict()
) rather than scores (decision_function()
orpredict_proba()
)Trying to set
response_method
inmake_scorer
doesn't work:because
roc_auc
is still a_PredictScorer
object.Passing
roc_auc
as string will work though.The following code also works:
but
_ThresholdScorer
is an undocumented class.I think
make_scorer()
should return_ThresholdScorer
or_PredictProbaScorer
object instead of_PredictScorer
object when setting theresponse_method
parameter because this bug is very easy to miss and most users might thinkmake_scorer(metrics.roc_auc_score)
and passing as'roc_auc'
will be the same.Update: setting
needs_threshold
parameter inmake_scorer()
function will work properly.Steps/Code to Reproduce
Expected Results
n/a
Actual Results
n/a
Versions
The text was updated successfully, but these errors were encountered: