Simplify Binary Features with OneHotEncoder's Drop='if_binary' Option 🚀

Learn how to easily drop the first category from binary features using OneHotEncoder's new drop='if_binary' parameter in version 0.23 for cleaner data preprocessing.

Data School3.2K views4:07

About this video

New in version 0.23: Use drop='if_binary' with OneHotEncoder to drop the first category ONLY if it's a binary feature (meaning it has exactly two categories). Note: Beginning in scikit-learn 1.0, drop='first' and drop='if_binary' can both be used with handle_unknown='ignore'. However, the dropped category and an unknown category will both be encoded as all zeros. 👉 New tips every TUESDAY and THURSDAY! 👈 🎥 Watch all tips: https://www.youtube.com/playlist?list=PL5-da3qGB5ID7YYAqireYEew2mWVvgmj6 🗒️ Code for all tips: https://github.com/justmarkham/scikit-learn-tips 💌 Get tips via email: https://scikit-learn.tips === WANT TO GET BETTER AT MACHINE LEARNING? === 1) LEARN THE FUNDAMENTALS in my intro course (free!): https://courses.dataschool.io/introduction-to-machine-learning-with-scikit-learn 2) BUILD YOUR ML CONFIDENCE in my intermediate course: https://courses.dataschool.io/building-an-effective-machine-learning-workflow-with-scikit-learn 3) LET'S CONNECT! - Newsletter: https://www.dataschool.io/subscribe/ - Twitter: https://twitter.com/justmarkham - Facebook: https://www.facebook.com/DataScienceSchool/ - LinkedIn: https://www.linkedin.com/in/justmarkham/

Tags and Topics

This video is tagged with the following topics. Click any tag to explore more related content and discover similar videos:

Tags help categorize content and make it easier to find related videos. Browse our collection to discover more content in these categories.

4.6

3 user reviews

Write a Review

0/1000 characters

User Reviews

0 reviews

Be the first to comment...

Video Information

Views
3.2K

Total views since publication

Likes
97

User likes and reactions

Duration
4:07

Video length

Published
Sep 28, 2021

Release date

Quality
hd

Video definition

Related Trending Topics

LIVE TRENDS

This video may be related to current global trending topics. Click any trend to explore more videos about what's hot right now!

THIS VIDEO IS TRENDING!

This video is currently trending in United States under the topic 'reese witherspoon'.

Share This Video

SOCIAL SHARE

Share this video with your friends and followers across all major social platforms including X (Twitter), Facebook, Youtube, Pinterest, VKontakte, and Odnoklassniki. Help spread the word about great content!