softmax: Softmax function.

View source: R/utils.R

softmaxR Documentation

Softmax function.

Description

Implementation of the softmax function.

Usage

softmax(logits)

Arguments

logits

An nxM matrix, with n the sample size and M the number of classes of an ordinal outcome.

Value

The same matrix where each row is normalized so that row sums equal 1; useful to construct conditional probability mass functions.

Author(s)

Riccardo Di Francesco


causalQual documentation built on April 3, 2025, 8:33 p.m.