KL divergence is always ≥ 0 and equals 0 only when P = Q exactly

Why can't we just compare two things directly?

Image: Robert Simmon, Public domain, via Wikimedia Commons

KL divergence is always ≥ 0 and equals 0 only when P = Q exactly

Why can't we just compare two things directly?

Imagine you're trying to match your taste in music with a friend's. You both have playlists, but they're not identical. You want to know how similar they are.

Think of it like trying to find the difference in taste between two fruit juices. The more you taste, the more you'll notice what makes them unique. The Kullback–Leibler divergence is like a taste test that tells you how much one juice differs from the other.

Example

If one juice has 10% apple flavor and the other has 15%, the difference is noticeable. If both juices have 10% apple flavor, there's no difference in taste.

Remember this

The Kullback–Leibler divergence measures how much one probability distribution diverges from another, showing the difference between them.

Related concepts

Swipe through 100 ML concepts daily

Open Pocket Polymath