R/softmax.R

Defines functions softmax

Documented in softmax

#' A helper function.
#'
#' @param 
#' x A vector to be mapped to the unit simplex.
#' @export

softmax <- function(x)
{
	 X = exp(x)
	 S = sum(X)
	 return(X/S)
}
ctross/PrisonR documentation built on July 1, 2024, 11:23 p.m.