1.2.3 Model families🔗ℹ

Each family pairs a response type with a glmnet solver and a link from the linear predictor η = β₀ + xβ to the response:

  • The Gaussian family (elnet) models a numeric response with the identity link: E[y] = η.

  • The binomial family (lognet) models a 0/1 label through the log-odds of class 1: log(P(y=1) / P(y=0)) = η.

  • The multinomial family (lognet with K > 2 classes) fits one linear predictor per class, ηk = a0k + xβk, and takes class probabilities as their softmax.

  • The Cox family (coxnet) models survival times through the proportional hazard h(t | x) = h₀(t) exp(xβ). The baseline hazard h₀ absorbs the intercept, so there is none.

  • The Poisson family (fishnet) models counts with the log link: E[y] = exp(η).

  • The multi-response Gaussian family (multelnet) fits one Gaussian model per response column under a grouped penalty: each predictor enters for every response or for none.

Family

  

Fit

  

Result

  

Prediction

Gaussian

  

elnet-fit

  

elnet-result

  

elnet-predict

Binomial

  

logistic-fit

  

logistic-result

  

logistic-predict-proba, logistic-predict

Multinomial

  

multinomial-fit

  

multinomial-result

  

multinomial-predict-proba, multinomial-predict

Cox

  

cox-fit

  

cox-result

  

cox-linear-predictor, cox-relative-risk

Poisson

  

poisson-fit

  

poisson-result

  

poisson-predict-mean

Multi-response

  

mgaussian-fit

  

mgaussian-result

  

mgaussian-predict

All six fit procedures take the same keywords: #:lambda, #:alpha, #:standardize?, #:intercept? (not cox-fit), #:thresh and #:max-iters. Each also has a path counterpart that fits many values of λ at once (see Regularization paths), and a cross-validation counterpart that chooses among them (see Choosing λ by cross-validation). Each prediction helper is predict with a fixed #:type; Predictions and coefficients covers predict and coef, which work on every result.