FIELD NOTES AN INTERACTIVE SCIENCE SERIES
MODEL CALIBRATION LAB

MACHINE LEARNING · CALIBRATION

When Base Rates Shift, Model Confidence Drifts

A classifier can keep seeing the same evidence and still become miscalibrated when the population changes.

ILLUSTRATIVE SEED583642ILLUSTRATIVE MODEL
LIVE OBSERVATORY

The parcel scanner

LABEL-SHIFT MODEL
↗
WHAT YOU ARE SEEING

The source and current populations have the same base rate. The original confidence remains appropriate.

Positive class Negative class Source decision Recalibrated decision
SOURCE CONFIDENCE · EVIDENCE + · ILLUSTRATIVE 88.8% source-calibrated posterior
CURRENT POSTERIOR · EVIDENCE + · ILLUSTRATIVE 61.5% target posterior under label shift
CONFIDENCE DRIFT · ILLUSTRATIVE −27.3 pp target minus source, percentage points
EXPECTED BRIER SCORE · ILLUSTRATIVE 0.124 source forecast on target population
MEASURE IT

Run a parcel audit

MONTE CARLO · ILLUSTRATIVE

Draw a fresh batch from the current population. Among parcels with positive scanner evidence, compare the observed positive fraction with the target-population Bayes prediction.

OBSERVED POSITIVE FRACTION—
TARGET THEORY—
POSITIVE-EVIDENCE PARCELS—
RELATIVE DIFFERENCE—

Run the audit to take a finite sample and compare it with the model's target-population prediction.

MODEL INTEGRITY

Independent numerical checks

LIVE
01Bayes rule vs. odds form
0.000% difftextbook identity
02Four-outcome probability mass
0.000% diffconservation of probability
03Brier score: joint vs. conditional
0.000% diffindependent enumeration

Checks recompute whenever a control changes. Differences are relative to the stated reference value; zero is expected for these algebraic identities.

OPEN THE MODELThe science+

1. The same evidence, a different prior

The scanner emits one of two evidence states, positive (+) or negative (−). Sensitivity and specificity describe the evidence process and are held constant between populations. Only the prevalence of the positive class changes.

P(Y=1 | E=+) = π · s / [π · s + (1−π) · (1−c)]
P(Y=1 | E=−) = π · (1−s) / [π · (1−s) + (1−π) · c]

Here π is positive-class prevalence, s is sensitivity, and c is specificity. The original model uses the source prevalence πs. Under label shift, the current population uses πt, so its posterior probabilities must be recalculated.

2. Odds correction

oddst(Y=1 | E) = oddss(Y=1 | E) × πt / (1−πt) / πs / (1−πs)

This is prior-probability adjustment. It is valid when class-conditional evidence distributions remain stable: P(E | Y) does not change. It is not a universal repair for arbitrary distribution shift.

3. What is simplified?

The observatory uses a binary class and two evidence outcomes, fixed sensitivity and specificity, and a known prevalence for each population. Real models usually emit continuous scores, have many classes, and estimate these quantities from finite data. The parcels and scanner are illustrative, not a deployed screening system.

All rates and sample counts are illustrative. The probability identities are textbook; no external dataset is used. A change in sensitivity or specificity is concept drift and is outside this label-shift-only model.

Made with 🤖 ChatGPT