Learn R Programming

babsim.hospital (version 11.8.8)

softmax: softmax

Description

softmax function

Usage

softmax(par)

Arguments

par

vector

Value

num vector with components >= 0 and sum = 1

Examples

Run this code
# NOT RUN {
p <- c(0.6, 0.3, 0.1)
softmax(p)
# }

Run the code above in your browser using DataLab