mdl_glmnet | R Documentation |
glmnet::glmnet()
.Simple wrapper for glmnet::glmnet()
and glmnet::cv.glmnet()
.
mdl_glmnet(y, X, cv = TRUE, ...)
y |
The outcome variable. |
X |
The (sparse) feature matrix. |
cv |
Boolean to indicate use of lasso with cross-validated penalty. |
... |
Additional arguments passed to |
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()
.
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.
glmnet::glmnet()
,glmnet::cv.glmnet()
Other ml_wrapper:
mdl_glm()
,
mdl_ranger()
,
mdl_xgboost()
,
ols()
glmnet_fit <- mdl_glmnet(rnorm(100), matrix(rnorm(1000), 100, 10))
class(glmnet_fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.