Skip to content

ENH despine keyword for ROC and PR curves #26367

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

Merged
merged 23 commits into from
Oct 30, 2024

Conversation

Charlie-XIAO
Copy link
Contributor

@Charlie-XIAO Charlie-XIAO commented May 14, 2023

Reference Issues/PRs

Towards #25929.

What does this implement/fix? Explain your changes.

This PR adds a new keyword despine to remove the top and right axes in order to make the plot clearer. For examples, please see this gist: https://gist.github.com/Charlie-XIAO/ecd5173fe0daa9c49f442153ef19e7d1

Any other comments?

This PR need to have PR #26366 and PR #26368 merged in advance. Also, this is related and may have a lot of conflicts with PR #26019.

@Charlie-XIAO
Copy link
Contributor Author

Charlie-XIAO commented May 14, 2023

Do I need to make tests for this? If so, do we add separate tests or parametrize current tests with the additional keyword?

@glemaitre
Copy link
Member

Do I need to make tests for this? If so, do we add separate tests or parametrize current tests with the additional keyword?

We would need to make a test to check that the parameter has the desired impact. I think that this is fine to isolate the checks in a new separate test.

@Charlie-XIAO
Copy link
Contributor Author

#26019 has been merged and I have resolved the merge conflicts. I think there has been no reply for over a week on this PR as well as #26366 and #26368. No hurry but is there any update on this issue @glemaitre?

@glemaitre glemaitre self-requested a review June 14, 2023 16:19
@github-actions
Copy link

github-actions bot commented Jul 23, 2023

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: cd9c439. Link to the linter CI: here

@Charlie-XIAO
Copy link
Contributor Author

Since #26366 is now merged, maybe this one is also ready for review? ping @glemaitre

@lucyleeow
Copy link
Member

lucyleeow commented Sep 12, 2024

ping @Charlie-XIAO are you still interested in working on this? (I think this is the last item before we can close #25929)

@Charlie-XIAO
Copy link
Contributor Author

Charlie-XIAO commented Sep 12, 2024

Yes sure, I will find some time within these days to resolve the conflicts and make things up-to-date first.

@Charlie-XIAO
Copy link
Contributor Author

@lucyleeow I've updated :)

Copy link
Member

@lucyleeow lucyleeow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I wonder if it would make sense to use it in one of the examples?

@lucyleeow lucyleeow added the Waiting for Second Reviewer First reviewer is done, need a second one! label Oct 5, 2024
@Charlie-XIAO
Copy link
Contributor Author

Charlie-XIAO commented Oct 13, 2024

Sorry for the delay and thanks for the suggestion @lucyleeow! I've added despine=True to the two basic examples using ROC curve and PR curve:

CI is strangely failing but I think none of those is related to this PR.

@Charlie-XIAO
Copy link
Contributor Author

Charlie-XIAO commented Oct 13, 2024

Maybe ping @glemaitre for another review? This is implemented based on your initial design #25929 (comment)

@glemaitre
Copy link
Member

I thought that I reviewed this PR but apparently I did not post my comments.
I'll make another pass tomorrow.

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I just pushed the main code in a small plotting utility function that can evolve over time if we need it somewhere else.

For other display, we might need to be able to specify the bounds but let see when making the subsequent PR.

@glemaitre glemaitre merged commit 59dd128 into scikit-learn:main Oct 30, 2024
30 checks passed
@Charlie-XIAO Charlie-XIAO deleted the pr-roc-despine branch January 4, 2025 04:50
@JosephBARBIERDARNAL JosephBARBIERDARNAL mentioned this pull request Apr 12, 2025
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:metrics Waiting for Second Reviewer First reviewer is done, need a second one!
Projects
Development

Successfully merging this pull request may close these issues.

3 participants