liveBook · Manning

Wasserstein distance

As explained in Machine Learning System Design

Wasserstein distance is a metric between probability distributions defined by the minimum cost of transporting mass from one distribution to another.

Wasserstein distance measures how much probability mass must move, and at what cost, to transform one distribution into another. In monitoring, it acts as an alert for prediction drift and data drift rather than as a standalone model-quality measure. section 14.5.1

Retail drift monitoring

A retail system tests Wasserstein distance above 0.1 as a drift alert alongside Population Stability Index above 0.2. When comparing April 2021 with April 2022, it scales the control data by the expected 15% business growth before computing the distance. The same approach supports early warnings for next-day, next-week, and next-month predictions. section 14.5.1

How Machine Learning System Design covers it

How deep it goes
Defines transport-based distribution comparison and applies thresholding, but does not derive the metric or explain its algorithm.
Examples
Uses retail forecasts, a 0.1 alert threshold, and April year-over-year comparisons adjusted for 15% expected growth.
What you can do after
Diagnose drift by comparing distributions, setting alerts, and adjusting control data for known business growth.
How it connects
Connects data drift with prediction drift, Population Stability Index, business growth, and model quality monitoring.

Also explained in

Compare how 4 books explain Wasserstein distance →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning System Design. The section links point to the parts of the book it draws on.