AI engineering glossary · Feature engineering data prep
What is OHE (one-hot encoding)?
One-hot encoding (also called OHE, One-hot): Encoding a categorical feature by creating one new binary column per category, with 1 in the column matching the row's category and 0 elsewhere. It avoids implying any order among categories, but adds many columns when a feature has many categories.
One-hot encoding: an example
Payment type with UPI, card and cash becomes three columns; a UPI payment is [1, 0, 0] and a cash payment is [0, 0, 1].
Related terms
More Feature engineering data prep terms
- Ordinal encoding
- Ordinal variable
- Outlier treatment
- Oversampling
- Polynomial features
- Power transform
- Quantile transform
- Rare category grouping
Where you learn it
One-hot encoding is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.