Feature engineering and preprocessing · insight-1119
Freeze and version bin edges so models and monitors compare like with like
- Evidence type
- practitioner heuristic
- Difficulty
- medium
- Roles
- ML engineer, Data scientist
- Industries
- banking, insurance
Summary: situation, action, reason, boundary
Situation
A feature is binned by quantiles for the model and again for a drift monitor, and the edges are recomputed on each retrain or on each incoming batch.
Action
Store training-time edges as a versioned model artefact, apply them unchanged in serving and monitoring, and compute live bin shares on those edges; new edges ship only with a new model version.
Reason
Population-stability style comparisons need the same bins on both sides; re-derived equal-population bins make every batch look like the reference.
Boundary
Scorecards, PSI-style monitors and any model that consumes binned inputs.
Symptom or risk
Bin definitions silently move; quantile edges on a new batch always give near-equal shares, so a real shift is absorbed by the edges themselves.
Exceptions
Exploratory analysis where nobody compares across runs.
Trade-offs
Old edges can become poor fits for a moved distribution, which is itself the signal to retrain.
Pitfalls
Monitoring with edges stored in a different place from the model's own, so they diverge after a hotfix.