Notes [#6]

Logarithm

The natural logarithm ln(x) answers "what power of e gives x?". For probabilities between 0 and 1 it is negative, and it falls steeply as x approaches 0, which is why confident wrong answers cost so much.

Figure 12 — The loss grows quickly as the probability of the right answer drops.
p (correct token) −ln(p) = loss
0.90 0.11
0.61 0.49
0.03 3.51