ENH Add 'warn' option to 'handle_unknown' parameter in OneHotEncoder#28637
Merged
Conversation
ogrisel
reviewed
Mar 18, 2024
ogrisel
left a comment
Member
There was a problem hiding this comment.
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.
Contributor
Author
|
@glemaitre @ogrisel |
Member
|
Let me add the milestone for the next release and prioritize this feature. |
glemaitre
approved these changes
May 18, 2024
Member
|
ping @OmarManzoor or @Charlie-XIAO maybe? |
Member
|
Thanks @OmarManzoor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?