AI Glossary

One-Hot Encoding

A representation method that converts categorical variables into binary vectors where exactly one element is 1 (hot) and all others are 0.

How It Works

For a variable with N categories, create an N-dimensional vector. Category k is represented by a vector with 1 at position k and 0 elsewhere. 'cat'=[1,0,0], 'dog'=[0,1,0], 'bird'=[0,0,1].

Limitations

Creates sparse, high-dimensional vectors. No notion of similarity between categories. Doesn't scale to large vocabularies. Embeddings (dense, learned representations) have largely replaced one-hot encoding for neural networks.

← Back to AI Glossary

Last updated: March 5, 2026