5.3.15 · D1MLOps & Deployment

Foundations — Model retraining pipelines

1,987 words9 min readBack to topic

Before you can read the parent note Model retraining pipelines, you must be fluent in a small pile of symbols and pictures. This page builds every one of them from nothing. Read top to bottom; each block only uses ideas already defined above it.


1. What is a "distribution" ? (the shape of a pile of data)

Everything in this topic rests on one word: distribution. If that word is fuzzy, nothing else lands.

Look at the figure. The horizontal axis is the thing we measured (age). The height of each bar is how big a slice of the crowd falls in that age band. The bars must add up to (i.e. ) — because every customer is somewhere. That "adds to 1" rule is what makes it a distribution and not just a bar chart.


2. The subscripts: vs , and vs

Now we decorate with labels so we can talk about which pile and which variable.

Why two different objects, and ? Because the world can move in two independent ways, and the topic's central classification depends on telling them apart:

What changed Name in parent Picture
moved, rule fixed data drift crowd got older, but "old ⇒ fraud" rule unchanged
moved concept drift same crowd, but now young people commit the fraud

You cannot understand the parent's "two kinds of drift" box without these two symbols.


3. The model (the frozen photograph itself)


4. Sum notation (how to add up many pieces)

The drift score adds one number per bin. You must be able to read the "add-them-all" symbol.

Here is the bin number and is the number of bins — we chop a feature's range into buckets and add one contribution per bucket.


5. Fractions and (two piles, same bins)

In the figure the blue bars (, training) and orange bars (, production) sit side by side per bin. Drift is literally the gap between blue and orange. If they overlap perfectly, nothing moved.


6. The logarithm (why this tool for measuring "how many times bigger")

The drift formula uses . Why a logarithm and not just ?

Read the figure: crosses zero at , is negative for shrinking ratios, positive for growing ones — the sign of tells you which direction the slice moved.


7. The sign-matching trick (why every drift term is )

Now every piece of the parent's PSI formula is defined:

Here is the one clever observation that makes it a valid "distance-like" score:


8. The comparison symbols , , (the promote gate)

The parent's promotion rule is


How these foundations feed the topic

Distribution P of X

train pile vs serve pile

conditional P of Y given X

Drift = the two piles differ

bins a_i and b_i

PSI drift score

ratio then ln

sum sigma

Trigger a retrain

model f with knobs theta

Champion vs Challenger

gate with delta cushion

Safe retraining pipeline

Every arrow says "you need this to understand that." Trace any path top to bottom and you have re-derived the parent note's spine.



Equipment checklist

Cover the right side; you are ready for the parent note only if you can say each answer out loud.

What does mean in one sentence?
The shape of a pile of data — what fraction of samples falls at each value of (bars adding to ).
What is the difference between and ?
is how the inputs are spread; is the rule giving answers once inputs are fixed.
What do and refer to?
The data shape at training time vs the data shape now, in production.
In , what is ?
The bag of tunable dials (weights) inside the model; retraining searches for new .
Read aloud.
"Let run from to and add up every ."
What are and ?
Fraction of the training crowd (expected) and production crowd (actual) landing in bin .
Why use of a ratio instead of a plain difference?
A ratio-then- measures proportional change symmetrically; (doubled) should count more than .
Why is every PSI bin term ?
and always share the same sign, so their product is never negative.
What does mean?
"If and only if" — the statement is true in exactly those cases and no others.
Why does the promote gate need ?
To ignore random measurement wobble and promote only on a real improvement.