Skip to content

Glossary: ML Beyond the Basics

Target encoding

Also written: TargetEncoder

Replacing a category with the average outcome for it, such as each zip code's cancel rate. It must be smoothed and cross-fitted, or each row's own label leaks into its encoding.

Where the book teaches it

Related terms

Cross fittingSmoothingHigh-cardinalityGroupKFold