glmnet
glmnet is a software package for fitting generalized linear models with elastic-net regularization. It computes the entire regularization path for a sequence of penalty parameters lambda using a fast coordinate-descent algorithm, enabling efficient fitting even when the number of predictors p is large. The package supports multiple model families, including Gaussian (linear regression), binomial (logistic regression), Poisson, multinomial, and Cox proportional hazards models, covering a broad range of regression and classification tasks.
Regularization is controlled by alpha in [0,1], where alpha=1 corresponds to lasso (L1 penalty) and alpha=0 to
The glmnet function returns an object containing the fitted coefficients for all lambda values, the intercepts,
glmnet is open-source, with code primarily in Fortran and an R interface, and is widely used in