-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
FIX make it possible to specify the positive label in roc_auc_score #18107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
average_precision_score, needs_threshold=True, | ||
) | ||
with pytest.raises(ValueError): | ||
average_precision_scorer(classifier, X_test, y_test) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also check the message to make the test easier to follow.
|
||
pos_label = "cancer" | ||
y_proba = y_proba[:, 0] | ||
y_decision_function *= -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a line such as:
assert classifier.classes_[0] == pos_label
to make the test easier to follow.
OK, so it seems that I figure out some of the stuffs. I will close all my PRs and open the following:
|
closes #17572
closes #17704