Why should an ordered pandas categorical column be audited before relying on LightGBM auto categorical detection?
Classic MLLevel: IntermediateLightGBM · Advanced topics
Why should an ordered pandas categorical column be audited before relying on LightGBM auto categorical detection?
Hints
- An ordering flag carries modeling semantics.
- Do you intend ordinal thresholds or arbitrary groups?
Answer
The documented auto mode distinguishes ordered from unordered categoricals and can use ordered codes numerically. Decide whether ordinal thresholds or categorical partitions fit the task, and specify handling explicitly when necessary.
Source and licence: LightGBM · Advanced topics · MIT · answer: Quantoros editorial