-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[API, MAINT] Deprecate usage of y_prob
and probas_pred
in sklearn.metrics
#28092
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
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
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.
All versions need to be bumped by 1
Otherwise LGTM.
sklearn/metrics/_classification.py
Outdated
"y_proba": ["array-like", None], | ||
"sample_weight": ["array-like", None], | ||
"pos_label": [Real, str, "boolean", None], | ||
"y_prob": ["array-like", StrOptions({"deprecated"})], |
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.
None
and "deprecated"
both need to be a hidden option.
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.
Done
sklearn/metrics/_ranking.py
Outdated
"y_score": ["array-like", None], | ||
"pos_label": [Real, str, "boolean", None], | ||
"sample_weight": ["array-like", None], | ||
"drop_intermediate": ["boolean"], | ||
"probas_pred": [ | ||
"array-like", | ||
StrOptions({"deprecated"}), |
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.
same here, hidden options.
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.
Done
Co-authored-by: Adrin Jalali <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
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.
Addressed your comments. Thanks @adrinjalali !
sklearn/metrics/_classification.py
Outdated
"y_proba": ["array-like", None], | ||
"sample_weight": ["array-like", None], | ||
"pos_label": [Real, str, "boolean", None], | ||
"y_prob": ["array-like", StrOptions({"deprecated"})], |
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.
Done
sklearn/metrics/_ranking.py
Outdated
"y_score": ["array-like", None], | ||
"pos_label": [Real, str, "boolean", None], | ||
"sample_weight": ["array-like", None], | ||
"drop_intermediate": ["boolean"], | ||
"probas_pred": [ | ||
"array-like", | ||
StrOptions({"deprecated"}), |
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.
Done
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.
LGTM. Thanks @adam2392
@glemaitre this should be a quick review. |
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.
Thank you for the PR @adam2392 !
Co-authored-by: Thomas J. Fan <[email protected]>
Thank you for the review! |
Signed-off-by: Adam Li <[email protected]>
The CI failures look related. |
Signed-off-by: Adam Li <[email protected]>
Ah yes. The check needed to handle various edge cases properly since the variable can be an array, or a string. It should be fixed hopefully now... |
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Reference Issues/PRs
Fixes: #27994
What does this implement/fix? Explain your changes.
Consolidates usage of
y_score
ory_proba
.Any other comments?