Learn R Programming

causalQual (version 1.0.0)

softmax: Softmax function.

Description

Implementation of the softmax function.

Usage

softmax(logits)

Value

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

Arguments

logits

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

Author

Riccardo Di Francesco