We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
This idea carries a full system design question on its own. Each walks through the full answer.
AI Engineering · Data Engineering For Ml
Free preview: the first 2 parts of this 26-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
Generative AI and Agentic AI Engineering
Unlock this lesson and the 208 other paid lessons
$35 once, by PayPal
See the Generative AI and Agentic AI courseread the rest of this lesson in
Generative AI and Agentic AI Engineering
Unlock this lesson and the 208 other paid lessons
$35 once, by PayPal
See the Generative AI and Agentic AI coursein Data Engineering For Ml
This lesson is part of the AI Engineering course. Unlock the full course, a separate one-time payment, for lifetime access.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime AccessFoundation lessons of this course are free, no payment needed. Try them now
Let me start with a picture.
A smoke alarm rings every time someone burns a slice of toast. It is loud, it is annoying, and nothing is actually wrong. Then one day a gas tap is left on. There is no smoke, so the alarm stays silent, and that is the day it mattered.

The alarm is not broken. It measures smoke, and smoke is not the same thing as danger.
Teams that run machine learning models have the same kind of alarm. It is called a drift monitor. It watches the new data coming in, and rings when that data starts to look different from the data the model learned from. The hope is that it rings when the model starts to go wrong.
This lesson measures whether it does. I built five kinds of new data and sent each to a real model 100 times. Every time, I checked two things: did the alarm ring, and was the model actually worse?
Please read this slide slowly if any word is new. Every slide after it uses these words.

Row, column and batch. Data comes as a table. Each row is one example, here one district of California. Each column is one fact about it, like its location. A batch is a group of new rows checked together, here 500 at a time.
Median. The middle value: half the values are above it, half below.
Model and error. The model here guesses the typical house price in a district of California from 8 facts about it, like the median income and the location. Its error is how far each guess lands from the real price, averaged over many districts. Lower is better.
Label. The true answer for a row, here the real price. In real life labels often arrive late, weeks after the guess. That is why teams watch the inputs instead.
Training rows. The examples the model learned from. New rows are districts it never saw, standing in for the data it meets after launch.
Drift. New rows that look different from the training rows: richer districts, older houses, a different part of the state.
Drift monitor. A program that compares new rows with the training rows, one column at a time, and gives a number for how different they are. Above a chosen line, it rings an alarm. Two common ones:
Prediction drift. Drift in the model's own guesses rather than in its inputs: the model suddenly guessing differently from how it guessed on the training rows. PSI can measure it too.
Harm. The model really doing worse. Here: its error on a batch of new rows is more than 10% above its usual error.