| softmax | R Documentation |
Applies the softmax to a vector or each record of a matrix.
softmax(x)
x |
Numeric vector or matrix. If vector, then the softmax of the vector will be returned. If matrix, then the softmax will be applied independently to each record (and a matrix returned). |
Returns a vector or matrix whose elements (if vector) or records (if matrix) are computed as exp(x)/sum(exp(x)). The softmax converts a vector or matrix record into a set of proportions which sum to one. If a matrix is provided for the x argument, then the softmax is applied independently for each record.
A numeric vector or matrix whose elements (if vector) or records (if matrix) sum to one.
normalize for vector or matrix normalization.
# Perform softmax on vector.
softmax(x=c(-0.25,0.75,1.5,0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.