-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[MRG + 1] Remove np.isclose() from ROC curve calculation #7353
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
I think at a minimum, this will require a what's new alerting users to the changed behaviour. Perhaps a non-regression test is also appropriate. Thanks for this. We'll squeeze it into an imminent release, perhaps? |
+1 for non-regression test with small values. +1 for 0.18 |
Modified an existing test ( |
can you rebase please? |
@@ -387,6 +387,11 @@ Bug fixes | |||
- Fix :class:`linear_model.ElasticNet` sparse decision function to match | |||
output with dense in the multioutput case. | |||
|
|||
- :func:`metrics.roc_curve` and :func:`metrics.precision_recall_curve` no | |||
longer round `y_score` values when creating ROC curves; this was causing |
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.
double backticks. methinks.
…s_new.rst. Modified a unit test to check for the kind of problems caused by isclose.
9f4aed4
to
d0dd283
Compare
Applied @amueller's suggesed fixes to the whatsnew entry, then rebased and squashed. |
lgtm |
LGTM |
Thanks @jblackburne :) |
Added a bugfix report to whats_new.rst. Modified a unit test to check for the kind of problems caused by isclose.
Added a bugfix report to whats_new.rst. Modified a unit test to check for the kind of problems caused by isclose.
Added a bugfix report to whats_new.rst. Modified a unit test to check for the kind of problems caused by isclose.
Added a bugfix report to whats_new.rst. Modified a unit test to check for the kind of problems caused by isclose.
This PR removes the use of
np.isclose()
when finding indices wherey_score
changes during calculation of ROC curves. It is equivalent to changing the tolerance parameters ofisclose
to 0. It is strictly a reversion of #3268.Fixes #3864, as well as dupes #4864 and #6688.
There is relevant discussion on #6693. To me it seemed that the consensus was to take this course of action. Further comments are welcome too.
If this is merged, #6693 can probably be closed as OBE.