Enterprise AI Bootcamp Demo 2

Drift detection and the retraining trigger

A model is fitted to a distribution. When the distribution moves, the model is wrong in a way no test-set score will reveal, because the test set came from the old world.

Reference against current

Reference window
2020-02-01 → 2020-06-01
Current window
2020-07-01 → 2020-09-02
Features drifting significantly
4
of 7 monitored, PSI ≥ 0.25
Score distribution PSI
1.243
significant shift
Retraining trigger: FIRED. The rule is a documented threshold, evaluated on a schedule, with an owner — not a quarterly meeting at which somebody wonders whether the model is still any good.

Per-signal drift

SignalPSIVerdict KS DKS p
Oil_temperature2.3376significant shift0.55380.00e+00
DV_eletric0.2002moderate shift0.17302.40e-127
Motor_current0.4024significant shift0.21951.64e-205
TP30.3082significant shift0.11221.25e-53
TP21.1127significant shift0.25942.58e-288
Caudal_impulses0.0000insufficient variation in reference0.11265.22e-54
H10.1875moderate shift0.13912.83e-82

The trap in this table

Every KS p-value here is effectively zero. With tens of thousands of samples per window, a KS test will call any change significant, including one of no consequence whatsoever. The D statistic is the effect size, and the PSI is the actionable quantity. Alerting on the p-value produces a drift monitor that fires every day and is switched off within a month.

The conventional PSI bands — below 0.1 stable, 0.1 to 0.25 moderate, above 0.25 significant — are a rule of thumb, not a test. Their value is that they are written down in advance and tied to an action.

Computed by scripts/build_models.py in 86.4s at 2026-08-09T19:08:15+00:00 · scikit-learn 1.6.1 · seed 20260809 · source: MetroPT-3 (Air Production Unit of a Metro do Porto train), CC BY 4.0, DOI 10.24432/C5VW3R. Nothing on this page is hardcoded.