Index Ai Academy
Glossary · Phase 3 · Machine learning

One-hot encoding

Also written: one-hot

Turning a category into columns of 0s and 1s, with a 1 in the column of the matching category.

Try it now

The order matters: fitting any step on all the data leaks the test set into training.

Learn it properly

Preparing data · Clean, encode and scale data before a model sees it. About 30 minutes.

Create a free account See what's in the lesson

Other terms from the same lesson

Never trained an AI?

Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.

Teach it to write