8000 TST Add unit tests for `_BinaryClassifierCurveDisplayMixin` by lucyleeow · Pull Request #31193 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

TST Add unit tests for _BinaryClassifierCurveDisplayMixin #31193

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 6 commits into from
May 12, 2025

Conversation

lucyleeow
Copy link
Member

Reference Issues/PRs

Ref: #30399 (comment)

What does this implement/fix? Explain your changes.

As discussed with @glemaitre the _BinaryClassifierCurveDisplayMixin methods/class methods should be tested in isolation, as well as when used inside other classes.
This adds unit tests for _BinaryClassifierCurveDisplayMixin methods.

Any other comments?

Copy link
github-actions bot commented Apr 14, 2025

✔️ Linting Passed

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

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

@glemaitre glemaitre self-requested a review April 16, 2025 09:08
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.

It looks good @lucyleeow

@jeremiedbb maybe you can have a quick look.

Copy link
Member
@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

Looks good. Just a couple of comments

Comment on lines 28 to 31
if name:
assert name_out == name
else:
assert name_out == display.estimator_name
Copy link
Member

Choose a reason for hiding this comment

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

maybe cleaner to set the expected value in the parametrization ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added it to the name parametrization (so it is a tuple with input and expected output), this isn't very clean but wasn't sure how to do it as we parametrize over ax input too.
Let me know what you think / there's a better way to add it to the parametrization.

@lucyleeow
Copy link
Member Author

@jeremiedbb review addressed, gentle ping, thanks!

@lucyleeow
Copy link
Member Author

@jeremiedbb well that was a brain fart, don't know what I was thinking. Fixed.

Copy link
Member
@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks

@jeremiedbb jeremiedbb merged commit 4480163 into scikit-learn:main May 12, 2025
36 checks passed
@lucyleeow lucyleeow deleted the tst_binclfcurve branch May 12, 2025 17:49
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0