penalty
to handle the elastic net (enet) penalty (Zou & Hastie, 2005)enet (lambda = NULL, ...)
penalty
. This is a list with elementsThe elastic net penalty $$P_{\lambda}^{en} (\boldsymbol{\beta}) = \lambda_1 \sum_{i=1}^p |\beta_i| + \lambda_2 \sum_{i=1}^p \beta_i^2, \quad \lambda = (\lambda_1, \lambda_2)$$ is a linear combination of the lasso penalty and the ridge penalty. Therefore the penalty covers these both as extreme cases.
penalty
, genet
, lasso
, ridge