liveBook · Manning

Wasserstein distance

As explained in Machine Learning Platform Engineering

Wasserstein distance is a measure of dissimilarity between probability distributions based on the minimum cost of transforming one distribution into another.

Wasserstein distance measures dissimilarity between probability distributions by estimating the minimum cost of transforming one distribution into another. In production ML, it compares a baseline reference distribution with a later current distribution to detect data drift. section 6.2

Use the distance as an operational drift signal:

  • A larger distance indicates greater distributional drift; a smaller distance indicates greater similarity. section 6.2
  • Evidently reports scores from 0 to infinity and uses 0.1 as its default drift-detection threshold. section 6.2.1
  • Compare each feature between reference and inference data, then inspect the resulting score in a report or dashboard. section 6.2.1

Monitoring feature drift with Evidently

Create a DataDriftPreset report, run it with reference_data and current_data, and save the result as drift_report.html. The report compares every column and records the selected statistical test and drift score. section 6.2.1

How Machine Learning Platform Engineering covers it

How deep it goes
Defines the measure, interprets its score and threshold, but stops short of mathematical derivation or implementation internals.
Examples
Uses reference and inference datasets, Evidently drift reports, HTML output, dashboards, and column-level drift metrics.
What it assumes
Assumes reference and current datasets, while introducing distribution comparison and drift-test selection in the monitoring workflow.
What you can do after
Operate Evidently to generate drift reports, inspect Wasserstein scores, and flag features exceeding the default threshold.
How it connects
Connects data drift with covariate shift, statistical tests, the Kolmogorov–Smirnov test, and the chi-square test.

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 Platform Engineering. The section links point to the parts of the book it draws on.