AI engineering glossary · Feature engineering data prep
What is binary encoding?
Binary encoding: Encoding categories by first assigning each an integer, then writing that integer in binary and splitting its digits across columns. It needs only about log2(k) columns for k categories, a compromise between label and one-hot encoding for high-cardinality features.
Binary encoding: an example
With 100 categories, binary encoding needs 7 columns, since 2^7 = 128, instead of 100 one-hot columns.
Related terms
More Feature engineering data prep terms
- Boruta
- Box-Cox transform
- Categorical variable
- Class imbalance
- Class weights
- Column transformer
- Constant feature
- Constant imputation
Where you learn it
Binary 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.