SoftMax | R Documentation |
Take softmax of a vector of values. Input are reals and output will be a vector of probabilities.
SoftMax(x, return.log = TRUE, logfn = log)
x |
Vector of real numbers, can be negative or positive |
return.log |
Return the log of the probabilities |
logfn |
function for logarithm. Default natural log. Can also use log2. |
plog vector of probabilities
p.mat <- SoftMax(jfit$ll.mat) # convert a vector of log-likelihoods into a vector of probabilities
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.