aNet.ai
Machine Learning/Learning path
0day streak0XP · Lv 1
← 5. Similarity / Divergence Measures
Lesson 1 of 13 7 min · 164 words

Distances vs. divergences

Why a divergence need not be symmetric or satisfy the triangle inequality.

A distance (metric) must satisfy four rules: non-negativity ; identity ; symmetry ; and the triangle inequality .

A divergence only needs the first two: it is non-negative and zero only when the distributions are equal. It may be asymmetric and may break the triangle inequality. KL divergence is the classic example — the 'distance' from P to Q differs from Q to P.

Two big families appear in this topic. F-divergences compare densities point by point through their ratio (KL, JS, χ², TV, Hellinger). Integral probability metrics compare expectations of test functions (Wasserstein, MMD, Kolmogorov). Total variation belongs to both.

Formula to remember

F-divergence

Slides

Convex f with f(1) = 0; a ratio-based divergence.

Quick check · +5 XP

For P = [0.4, 0.6] and Q = [0.5, 0.5], D_KL(P‖Q) is approximately…

Practice this topic
Saved in this browser as you type.
aNet.ai · Introduction to Machine Learning · NewUU course outlineProgress saved in this browser