5 · Data Preprocessing & Feature Engineering

Categorical Preprocessing

Categorical Preprocessing groups the core ideas a learner needs at the 5 · data preprocessing & feature engineering stage. Work through the lessons in order when new to the area, or use them independently as a reference when implementing an analysis.

How to use this topic

Learn the mechanism one decision at a time

Work through the lessons in order if the topic is new. If you already know the basics, open the specific leaf lesson that matches the operation, diagnostic or failure mode you need.

1Definition→
2Mechanism→
3Example→
4Diagnostic→
5Decision
01
One-hot encodingOne-hot encoding changes how raw variables are represented for analysis or modelling. The transformation should preserve the information needed by the task while making assumptions explicit and reproducible.
02
Ordinal encodingOrdinal encoding changes how raw variables are represented for analysis or modelling. The transformation should preserve the information needed by the task while making assumptions explicit and reproducible.
03
Target encodingTarget encoding changes how raw variables are represented for analysis or modelling. The transformation should preserve the information needed by the task while making assumptions explicit and reproducible.
04
Frequency / count encodingFrequency / count encoding changes how raw variables are represented for analysis or modelling. The transformation should preserve the information needed by the task while making assumptions explicit and reproducible.
05
High-cardinality categoriesHigh-cardinality categories is a practical concept within Categorical Preprocessing. It helps turn the broader workflow stage “5 · Data Preprocessing & Feature Engineering” into an explicit analytical decision that can be explained, implemented and checked. The concept should be understood in terms of purpose, mechanism, assumptions, evidence and downstream consequences.
06
Unknown categories at inferenceUnknown categories at inference is a practical concept within Categorical Preprocessing. It helps turn the broader workflow stage “5 · Data Preprocessing & Feature Engineering” into an explicit analytical decision that can be explained, implemented and checked. The concept should be understood in terms of purpose, mechanism, assumptions, evidence and downstream consequences.
07
Avoiding target leakage in encodersAvoiding target leakage in encoders is a practical concept within Categorical Preprocessing. It helps turn the broader workflow stage “5 · Data Preprocessing & Feature Engineering” into an explicit analytical decision that can be explained, implemented and checked. The concept should be understood in terms of purpose, mechanism, assumptions, evidence and downstream consequences.