-
-
Notifications
You must be signed in to change notification settings - Fork 26k
MNT remove default behaviour deprecation from class_likelihood_ratios #31331
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
MNT remove default behaviour deprecation from class_likelihood_ratios #31331
Conversation
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.
Otherwise LGTM.
@@ -2220,28 +2213,11 @@ class are present in `y_true`): both likelihood ratios are undefined. | |||
"`UndefinedMetricWarning` will always be raised in case of a division by zero " | |||
"and the value set with the `replace_undefined_by` param will be returned." |
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.
We also talked about expanding this error message to include a hint on how to handle this with catch_warnings
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.
Yes, I've expanded the UndefinedMetricWarning messages to mention warnings.catch_warnings()
.
There's probably also a changelog for the old PR which we need to fix? |
Thanks, @adrinjalali. |
I think that #29288 is missing a changelog entry for the deprecation of |
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.
(I added the missing changelog entry)
LGTM. Thanks @StefanieSenger
Thank you, @jeremiedbb! |
Reference Issues/PRs
towards #29048
(It's a partial reversal of #29288.)
What does this implement/fix? Explain your changes.
This removes the deprecation of the default behaviour in case of a zero division from
class_likelihood_ratios
.The default behaviour in case of a division by zero was
np.nan
before, as (indirectly) defined byraise_warning=True
, which was the default before..CC @adrinjalali, @jeremiedbb, @virchan