Given the data set (vector) x = (x1, x2, ... , xn) , calculate the Softmax function (distribution) σ : ℝn → (0,1)n, such that σ(xi) =
exi
∑
nj=1
exj
and the LogSumExp function LSE : ℝn → ℝ, such that LSE(x) = ln(
∑
nj=1
exj
) Please Note:
All values are calculated with the precision of 10-15, but are displayed with the precision of 10-9.
If any of the values xi, from the data set, is greater then any other value xj by 35, or more, its σ(xi) value will become dominant over all other σ values by the precision greater then the maximal precision of the floating point arihmetic.