Skip to content
ML Academy

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

  1. 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.

  2. 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.

  3. Reason

    Under label shift, p(x∣y)p(x\mid y) is unchanged, so posteriors can be corrected by Bayes' rule with the new priors without retraining.

  4. 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