Skip to content

ENH: add option in OneVsRest classifier to handle undefined predictions #31448

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

MarcBresson
Copy link
Contributor

Reference Issues/PRs

Fixes #31224. See also #31228 that made a bug fix related to the same area.

What does this implement/fix? Explain your changes.

This gives the user control over how undefined predictions are handled in OneVsRest classifiers. There are a new parameter that can take 4 different options. See the docstring for what they are and what they enable.

Any other comments?

I wasn't so sure what to do with the case where OneVsRest is used with a binary target. Any input would be appreciated.

Copy link

github-actions bot commented May 28, 2025

✔️ Linting Passed

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

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

@MarcBresson MarcBresson force-pushed the feat/one-vs-rest-unknown-pred branch from 772e33f to f340aba Compare May 29, 2025 13:20
@MarcBresson MarcBresson marked this pull request as ready for review May 29, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OneVsRestClassifier when all estimators predict a sample belongs to the other classes
1 participant