One-hot Encoding

Learn how to use one-hot encoding for the categorical features.

What is one-hot encoding?

One-hot encoding is another method to convert categorical features into numerical features. Unlike the label encoding methods we saw in the previous lesson, one-hot converts each categorical value into a new column and assigns a value of 1 or 0 to the columns. This is shown in the image below:

Get hands-on with 1200+ tech skills courses.