AI engineering glossary · Feature engineering data prep
What is leave-one-out encoding?
Leave-one-out encoding: A form of target encoding where each row's category value is the target mean of all other rows in that category, excluding the row itself. This reduces direct target leakage, though it can still leak subtly and can be exploited by trees.
Leave-one-out encoding: an example
For a city with 4 rows having targets 1, 0, 1, 1, the first row is encoded as (0 + 1 + 1) / 3 = 0.67.
Related terms
More Feature engineering data prep terms
- Lemmatization
- Listwise deletion
- Log transform
- Mahalanobis distance
- Max-abs scaling
- Mean imputation
- Median imputation
- Min-max scaling
Where you learn it
Leave-one-out 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.