powered by
Calculate the softmax (normalized exponential) of a vector of values or a set of vectors stacked rowwise.
softmax(x)
The softmax of x.
x
numeric vector or matrix
numeric
dat <- matrix(runif(100, -1, 1), 25, 4) softmax(dat) softmax(dat[,1])
Run the code above in your browser using DataLab