Softmax Function
The softmax function (σ
) is a mathematical function that normalizes a vector
of real numbers into a probability distribution. It applies the exponential function
to each element in the vector and then divides the results by the sum of the
exponentiated values.
We can define softmax using the following equation:
where:
-
x
is an input vector of real numbers -
σ(x)
is an output vector whose sum is 1 -
K
is the number of elements inx
andσ(x)
and indicates the number of possible outcomes -
xi is the
i
th element inx
-
σ(x)i is the
i
th element inσ(x)
and represents the probability of thei
th outcome
This page references the following sources: