Simple wrapper for glmnet::glmnet() and glmnet::cv.glmnet().
Arguments
- y
The outcome variable.
- X
The (sparse) feature matrix.
- cv
Boolean to indicate use of lasso with cross-validated penalty.
- ...
Additional arguments passed to
glmnet. Seeglmnet::glmnet()andglmnet::cv.glmnet()for a complete list of arguments.
Value
mdl_glmnet returns an object of S3 class mdl_glmnet as
a simple mask of the return object of glmnet::glmnet() or
glmnet::cv.glmnet().
References
Friedman J, Hastie T, Tibshirani R (2010). "Regularization Paths for Generalized Linear Models via Coordinate Descent." Journal of Statistical Software, 33(1), 1–22.
Simon N, Friedman J, Hastie T, Tibshirani R (2011). "Regularization Paths for Cox's Proportional Hazards Model via Coordinate Descent." Journal of Statistical Software, 39(5), 1–13.
See also
glmnet::glmnet(),glmnet::cv.glmnet()
Other ml_wrapper:
mdl_glm(),
mdl_ranger(),
mdl_xgboost(),
ols()