Classical ML, validation, metrics, interpretation, debugging · insight-0156
Adjust predicted probabilities when the class prior shifts but the class-conditional patterns do not
- Evidence type
- documented fact
- Difficulty
- hard
- Roles
- Data scientist, ML engineer
- Industries
- aviation, banking
Summary: situation, action, reason, boundary
Situation
Prevalence in production differs from training, for example no-show rates rising in a holiday season or fraud rates after a new attack wave.
Action
Estimate the new prior (from recent labels or with black-box shift estimation), reweight posteriors by the ratio of new to old priors and renormalize, then confirm calibration as labels arrive.
Reason
Under label shift, is unchanged, so posteriors can be corrected by Bayes' rule with the new priors without retraining.
Boundary
Classification where the mix of classes changes faster than what each class looks like.
Symptom or risk
Probabilities stay anchored to the training prior; thresholds and capacity plans based on them misfire.
Exceptions
If the behaviour of each class also changes (concept drift), prior correction is insufficient; retrain.
Trade-offs
Prior estimates from few recent labels are noisy; smooth them over time.
Pitfalls
Applying prior correction to a model that was already rebalanced without accounting for the training sampling ratio.
Lessons and concepts
Claims and their sources
Classifier posteriors trained under one class prior are not valid under new priors and can be adjusted to the new priors.
Label shift is defined as p(y) changing while p(x|y) stays fixed; black box shift estimation estimates the new label distribution from a fixed predictor's confusion matrix.