One-Hot Encoding vs. Label Encoding using Scikit-Learn

Alakh Sethi
Mar 5, 2020 · 6 min read

What is One-Hot Encoding? When should you use One-Hot Encoding over Label Encoding?

These are typical data science interview questions every aspiring data scientist needs to know the answer to. After all, you’ll often find yourself having to make a choice between the two in a data science project!

Machines understand numbers, not text. We need to convert each text category to numbers in order for the machine to process them using mathematical equations. Ever…