add 'most_frequent' drop method to OneHotEncoder
See original GitHub issueI would like to propose adding a ‘most_frequent’ method as one of the drop
parameter options in OneHotEncoder.
I find that using the most frequent value as the reference level aids with interpreting the newly created OHE features. The ‘first’ method is not very intuitive.
I would also be helpful if a dropped_levels_
attribute was included, instead of having to derive it from the categories_
and drop_idx_
attributes. Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
sklearn.preprocessing.OneHotEncoder
Specifies a methodology to use to drop one of the categories per feature. This is useful in situations where perfectly collinear features cause...
Read more >OneHotEncoder — 1.3.0 - Feature-engine
We can drop automatically the last dummy variable for those variables ... the transformer will add binary variables only for the 6 most...
Read more >How to Perform One-Hot Encoding For Multi Categorical ...
Technique For Multi Categorical Variables. The technique is that we will limit one-hot encoding to the 10 most frequent labels of the variable....
Read more >Input contains NaN when onehotencoding | Data Science and ...
I tried to drop columns with missing values, and get this error: ... step1 : impute x_test using mostfrequent method, This will remove...
Read more >Feature Engineering-How to Perform One Hot Encoding for ...
Hi All,After Completing this video you will understand how we can perform One hot Encoding for Multi Categorical Features.amazon url: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Makes sense. I’d be happy to see this.
I would find this quite useful as well. I am willing to make a pull request if core development team approves.