Skip to contents

Takes a vector of real numbers and returns the corresponding vector of probabilities

Usage

softmax(eta, log = FALSE)

Arguments

eta

Vector

log

Logical, whether to return the value of the logarithm

Value

A vector equal to length of eta: \(\exp(\eta)/\sum\exp(\eta)\)

Details

Uses MARS:::logspace.add for numerical stability