Description Usage Arguments Details Value Author(s) References See Also
Using the glmnet package implementation.
1 2 3 4 5 | fit_glmnet(x, y, family, nfolds, foldid, alpha = 1, lambda = NULL, ...)
fit_ridge_regression(...)
fit_lasso(...)
|
x |
Dataset. |
y |
Response vector. Can be of many different types for solving
different problems, see |
family |
Determines the the type of problem to solve. Auto detected if
|
nfolds |
See |
foldid |
See |
alpha |
Regularization parameter, see |
lambda |
Regularization parameter, see |
... |
Sent to |
The alpha
parameter of glmnet
controls the type of
penalty. Use 0
(default) for lasso only, 1
for ridge only, or
an intermediate for a combination. This is typically the parameter to tune
on. The shrinkage, controlled by the lambda
parameter, can be left
unspecified for internal tuning (works the same way as
fit_glmnet
).
Fitted elastic net model.
Christofer Bäcklin
Friedman J, Hastie T, Tibshirani R (2010). Regularization Paths for Generalized Linear Models via Coordinate Descent. Journal of Statistical Software, 33(1), 1–22. doi:10.18637/jss.v033.i01.
emil
, predict_glmnet
,
importance_glmnet
, modeling_procedure
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.