softmax: Softmax Function

Description Usage Arguments Value Examples

View source: R/softmax.R

Description

This function maps a numeric vector of real numbers to a vector of proportions, between 0 and 1, summing to 1.

Usage

1

Arguments

x

numeric vector of real numbers

Value

numeric vector of proportions between 0 and 1 with a sum of 1

Examples

1
2
x = c(5,6,1,10)
softmax(x)

GarrettMooney/moonmisc documentation built on Oct. 19, 2019, 7:51 p.m.