Calculator: Softmax probabilities

Enter the labelled inputs to calculate: Values (spaces or semicolons; decimal point) p; Entropy (bit).

Values (spaces or semicolons; decimal point) p
0.3333333333; 0.3333333333; 0.3333333333
Entropy (bit)
1.584962501

How the calculation works

pi=exp[(zi−max z)/T]/Σexp[(zj−max z)/T]

Use the displayed units and finite inputs. Results follow the stated mathematical model; zero denominators and undefined cases are rejected. Up to ten significant digits are displayed.

Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

Frequently asked questions

How is the result calculated?

pi=exp[(zi−max z)/T]/Σexp[(zj−max z)/T]

What assumptions apply?

Use the displayed units and finite inputs. Results follow the stated mathematical model; zero denominators and undefined cases are rejected. Up to ten significant digits are displayed.

How precise are the displayed results?

Numerical results show up to ten significant digits. Rounding does not improve the accuracy of the input measurements or the model. Values must satisfy the formula’s domain. Nonzero results too small or too large for reliable representation are rejected.

How we verified this calculator

The calculator is checked against 3 reference cases computed independently of its code. Last passed: .

# Inputs Expected result
1
Values (spaces or semicolons; decimal point) z = 1 2 3
Coefficient T = 1
Values (spaces or semicolons; decimal point) p: 0.09003057317; 0.2447284711; 0.6652409558
Entropy (bit): 1.200892978
2
Values (spaces or semicolons; decimal point) z = 0.5; -1; 2; 2
Coefficient T = 2
Values (spaces or semicolons; decimal point) p: 0.1752428599; 0.08277886561; 0.3709891373; 0.3709891373
Entropy (bit): 1.799304642
3
Values (spaces or semicolons; decimal point) z = 10 0
Coefficient T = 2
Values (spaces or semicolons; decimal point) p: 0.9933071491; 0.006692850924
Entropy (bit): 0.05796691415

How we test our calculators →

Also try:

Back to category →