Functions & Programming Concepts · Level 2 of 5
Softmax
A transformation from real-valued scores to a positive vector summing to one.
Exponentials are normalized across a selected axis; numerical implementations subtract a maximum for stability.
Example
Three class scores become a categorical probability distribution.
Listen to the definition and example
Audio transcript
Softmax. A transformation from real-valued scores to a positive vector summing to one. Exponentials are normalized across a selected axis; numerical implementations subtract a maximum for stability. For example: Three class scores become a categorical probability distribution.
Explore this concept
A useful analogy
Turning competing scores into shares of one whole pie.
Why it matters
This helps you distinguish a computation’s contract, inputs, outputs, and behavior.
Technical detail
softmax(z)_i = exp(z_i − m) / Σ_j exp(z_j − m), with m = max(z). Subtracting m preserves the result and improves numerical stability.
Common misconception
Softmax outputs sum to one, but they are not automatically calibrated probabilities.
Start with
Related concepts
Quick recall question
Try answering before looking back at the definition.