pretty_cv.glmnet {PheVis} | 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.