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.

Level: beginnerTopic: Feature engineering data prep

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.