View source: R/pretty_cv.glmnet.R
pretty_cv.glmnet | R Documentation |
Train a 'glmnet' with cross validation (cv) model and return convenient results (model and results with non zero coefficients)
pretty_cv.glmnet(
x_glmnet,
y,
alpha = 1,
family = "binomial",
s = "lambda.1se",
weights = rep(1, nrow(x_glmnet)),
...
)
x_glmnet |
Independent variable matrix (X) |
y |
Dependent variable vector (Y) |
alpha |
alpha parameter of glmnet (default = 1) |
family |
family parameter of glmnet (default = "binomial") |
s |
lambda chosen from cv.glmnet (default = "lambda.1se") |
weights |
glmnet parameter |
... |
additional parameters passed to glmnet |
A list with the model, the coefficient associated with variables and the selected variables.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.