A model works with Python dataframes but fails after porting category codes to another binding. What must be versioned…
Classic MLLevel: IntermediateXGBoost · Categorical data
A model works with Python dataframes but fails after porting category codes to another binding. What must be versioned with it?
Hints
- Does every binding store label semantics?
- Codes without a dictionary can change meaning.
Answer
The category-to-code mapping and feature schema. Python auto-recoding is version/input dependent and must not be assumed for every language binding or raw array; explicitly preserve the training mapping.
Source and licence: XGBoost · Categorical data · Apache-2.0 · answer: Quantoros editorial