softmax: Compute the softmax-transformed version of a vector or a...

View source: R/helper_functions.R

softmaxR Documentation

Compute the softmax-transformed version of a vector or a matrix. Reminder: if x is an ALR-transformed compositional vector, you want to append 0 as the final element of the vector (if x is a vector), or a final column of zeros (if x is a matrix)

Description

Compute the softmax-transformed version of a vector or a matrix. Reminder: if x is an ALR-transformed compositional vector, you want to append 0 as the final element of the vector (if x is a vector), or a final column of zeros (if x is a matrix)

Usage

softmax(x)

Arguments

x:

a vector or a matrix

Value

the softmax-transformed x


lm687/CompSign documentation built on Feb. 1, 2024, 4:41 p.m.