pretty_cv.glmnet {PheVis} | R Documentation |
pretty_cv.glmnet
Description
Train a 'glmnet' with cross validation (cv) model and return convenient results (model and results with non zero coefficients)
Usage
pretty_cv.glmnet(
x_glmnet,
y,
alpha = 1,
family = "binomial",
s = "lambda.1se",
weights = rep(1, nrow(x_glmnet)),
...
)
Arguments
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 |
Value
A list with the model, the coefficient associated with variables and the selected variables.
[Package PheVis version 1.0.4 Index]