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
[MRG] Add min_tpr parameter to roc_auc_score, allow both min_tpr and max_fpr #19751
base: main
Are you sure you want to change the base?
Conversation
Could anyone help me with the
Do I need to change any core function of test_common? |
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.
Hth
Is anyone reviewing the MRG? I'd appreciate your comments and make improvements if needed. |
Hi @Fengjun-Wang I'm sorry your PR got lost at some point. If you are still interested in it, do you mind synchronizing with upstream? If not, this is totally understandable. I will put the PR in the "Help Wanted" pool. Thanks for your patience and your work so far. |
@cmarmo Thanks for your attention. I will do it in Feb. |
Thanks @Fengjun-Wang for following-up. The lint fail is black related. You can solve it following the instructions here. |
Thank you! I fixed the formatting and Test coverage issues. Now it passed all the checks. |
Hi @Fengjun-Wang, sorry for the wait. I pushed a cosmetic change to the example to trigger the CI again to check the HTML rendering of the example and to ease the review. |
I merged the |
doc/whats_new/v0.24.rst
Outdated
- |Enhancement| Add `min_tpr` parameter in :func:`metrics.roc_auc_score`, | ||
allowing both `max_fpr` and `min_tpr` restrictions on partial AUC calculation. |
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.
This changelog entry needs to be moved to v1.2.rst
and may I suggest the following rephrasing to make the change more explicit:
- |Enhancement| Add `min_tpr` parameter in :func:`metrics.roc_auc_score`, | |
allowing both `max_fpr` and `min_tpr` restrictions on partial AUC calculation. | |
- |Enhancement| Add `min_tpr` parameters to :func:`metrics.roc_auc_score` | |
allowing to set restrictions on the True Positive Rates to compute partial | |
ROC AUC when used in conjunction with the existing `max_fpr` parameter. |
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.
thx. I am changing it and going to push
interpolate=True, | ||
color="green", | ||
) | ||
plt.show() |
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.
This does not render in sphinx-gallery. I believe that the filename of the example needs to be renamed to examples/model_selection/plot_partial_auc.py
for this to work.
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.
Actually we should probably merge this into the existing plot_roc.py
as additional sections to avoid proliferation of example in the gallery which makes it hard to navigate.
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 renamed it. Can you review, and let me know do we want to merge it in plot_roc
? plot_roc
is a quite long section, maybe we just need an additional link to tell the user we have partial auc
? @ogrisel
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.
Black hook reformat my file, and that reformat seems cause the file violate PEP8's max line length. Like stated here"psf/black#1178
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 allowed black changes, since otherwise the Linting has errors
We won't have time to finish the review on this one before the 1.2 release. Moving it to 1.3 |
Reference Issues/PRs
Fixes #11668
Fixes #11725
See also #3273
See also #3840
What does this implement/fix? Explain your changes.
min_tpr
andmax_fpr
limitations at the same time.