-
-
Notifications
You must be signed in to change notification settings - Fork 26.1k
ENH Add 'warn' option to 'handle_unknown' parameter in OneHotEncoder #28637
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
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.
Thanks for the PR. I would rather make handle_unknown="warn"
behave like handle_unknown="infrequent_if_exist"
instead of handle_unknown="ignore"
. I think this would give more control to the user.
Note that when #28619 was originally open, handle_unknown="infrequent_if_exist"
did not exist yet.
@glemaitre @ogrisel |
Let me add the milestone for the next release and prioritize this feature. |
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.
ping @OmarManzoor or @Charlie-XIAO maybe? |
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.
LGTM. Thanks @glevv
Thanks @OmarManzoor |
Reference Issues/PRs
Fixes #28619. See also #16881
What does this implement/fix? Explain your changes.
Added 'warn' option to OneHotEncoder that behaves same as option 'ignore', but raises a warning for every unknown category.
Any other comments?