|
|
||
|
This interactive simulation visualizes the SoftMax function used in classification. You adjust raw logits and a temperature parameter, watch them become probabilities, and pick a true class to highlight in the formula breakdown.
Math behind the Simulation1. The pipeline SoftMax turns unconstrained logits z1, …, zn into probabilities that sum to 1: Pi = ezi/T / ∑j ezj/T. Stage 1: Logits — raw scores (any sign). Stage 2: Exponentiation — ez/T makes values positive and exaggerates differences. Stage 3: Normalization — divide by the sum so probabilities add to 1. 2. Temperature T Low T sharpens the distribution (almost one-hot); high T softens it toward uniform. T appears in the exponent: zi/T. 3. True class Use the True radio under each probability bar to select which class to highlight. The formula breakdown shows Pi for that class. Formula: Pi = ezi/T / ∑j ezj/T
1.0
Logits (z)ez/TProbability (P)P0 = e^2 / (e^2 + …) = 0.00
UsageFollow these steps to explore the SoftMax pipeline:
Tips: Try low T (e.g. 0.2) vs high T (e.g. 3) to compare sharp vs soft distributions. The exponentiation (ez/T) bars use a dynamic scale: the tallest bar is always 100%, so no clipping; relative heights show the true ratios even when values differ by orders of magnitude. Parameters
|
||