Machine learning models · Phase 7 · Lesson 58

Monitoring, drift and retraining

Monitor data, predictions, outcomes and system health, then define when intervention is justified.

This is one focused step in the 60-lesson course. Use the retrieval check before moving on.

Lesson goal

Monitor data, predictions, outcomes and system health, then define when intervention is justified.

The core idea

A model can fail without code changing because the world, the data pipeline, the population or the relationship between features and outcomes changed.

Mental model

Picture it this way. A model can fail without code changing because the world, the data pipeline, the population or the relationship between features and outcomes changed. The important question is what assumption this picture makes, and whether that assumption fits the data.

Mathematical core

Covariate shift changes P(x). Label shift changes P(y). Concept drift changes P(y | x). Monitoring can compare distributions, delayed labels and performance over time.

Worked example

A fraud model sees a new payment channel. Feature distributions shift first; confirmed fraud labels arrive weeks later. The response may be a threshold change, investigation or retraining.

When to use it

It earns a place when

  • Monitor input quality, missingness, score distributions, slice performance, calibration, latency and business outcomes with ownership and runbooks.
  • You can evaluate it against a credible baseline.
  • Its output fits the decision and data constraints.

Do not make it the default when

  • Do not retrain on a timer without diagnosing the change, and do not treat a drift statistic as proof that performance has fallen.
  • A simpler model has not been tested.
  • The data or target definition is still unclear.

Failure modes

Watch for this. Alerts can be noisy. Feedback loops, delayed labels, selective outcomes and changing policy make root cause difficult.

When a result looks surprisingly good, inspect the split, target timing, error slices and data-generating process before celebrating.

Practice

Use this as a small experiment rather than a recipe to copy blindly. Change one thing, record the result and explain the change.

Do this. Design a monitoring dashboard for one model. For each signal, state what it detects, how quickly it arrives and what action follows.

Retrieval check

Answer from memory first. The buttons reveal feedback, but the durable step is explaining why.

1. What is concept drift?

2. Why may labels arrive late?

3. Why not retrain on a timer alone?

Transfer prompt. Describe one real problem where this model or idea would be a sensible candidate. Name the target, the main risk and the metric you would inspect.

Primary source

Google ML Crash Course. Use the source for the deeper treatment after you can explain the lesson's core idea without looking.