Description Usage Arguments Value Examples
View source: R/glmnet_ridge_lambda_best.R
This function is used to select the optimal lambda in ridge regression by function cv.glmnet in the glmnet package.It's used to check whether the self-defined method works.
1 |
formula |
a symbolic description of the model to be fitted. |
data |
a dataframe containing the variables in the model. |
the best lambda in ridge regression given by the function cv.glmnet.
1 | glmnet_ridge_lambda_best(Sepal.Width~.,iris)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.