Skip to main content

Module multinomial

Module multinomial 

Source
Expand description

Multinomial logistic regression / softmax classifier (ISL ch 4.3.5, PRML ch 4).

P(y=c | x) = softmax(W_c·φ(x)). Fit by gradient ascent on the regularized log-likelihood (the multinomial cross-entropy is convex, so this converges to the global optimum); a small L2 term keeps the solution finite under separation. Kernel-class DenseLinear (the logits) — scalar fit loop is CPU.

Structs§

MultinomialLogistic
A fitted softmax classifier. weights is n_classes × k row-major (k = p + intercept).