Why is feeding arbitrary integer category IDs as numerical XGBoost features a different model from native categorical…
Classic MLLevel: IntermediateXGBoost · Categorical data
Why is feeding arbitrary integer category IDs as numerical XGBoost features a different model from native categorical splitting?
Hints
- What does a threshold on an ID mean?
- Compare ordering with subset membership.
Answer
Numerical thresholds impose an artificial ordering of IDs. Native categorical splits test membership in a category subset; declare categorical types explicitly and compare on held-out data.
Source and licence: XGBoost · Categorical data · Apache-2.0 · answer: Quantoros editorial