Cross-entropy

Information theory · Formula · Appears in 3 lessons

H(P,Q)=−∑xP(x)log⁡Q(x)H(P, Q) = -\sum_{x} P(x) \log Q(x)

The average number of bits needed to encode data from P using a code optimised for Q. It splits into the entropy of P plus the divergence from P to Q, which is why minimising it over a model is the same as minimising that divergence.

Symbols

PP
The true distribution, usually a one-hot label in practice.
QQ
The predicted distribution the model outputs.
Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark