How to Encode Categorical Features With Many Categories?
We often encode categorical columns with one-hot encoding. But the feature matrix becomes sparse and unmanageable with many categories.
The category-encoders library provides a suite of encoders specifically for categorical variables. This makes it effortless to experiment with various encoding techniques.
For instance, I used its binary encoder above to represent a categorical column in binary format.
Read more: Documentation.
Share this post on LinkedIn: Post Link.
Thanks for reading Daily Dose of Data Science! Subscribe for free to receive new posts and support my work.
Find the code for my tips here: GitHub.
I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn.