cv_lasso: cv_lasso

Description Usage Arguments Value

Description

use cross-validation to find the best value of lambda

Usage

1
2
cv_lasso(lambda_max = 5, step_lambda = 0.1, n_folds = 10, y, X,
  one_stderr_rule = TRUE)

Arguments

lambda_max

maximum lambda to try

step_lambda

step size between 0 and lambda_max

n_folds

the number of folds to use in cross-validation

y

a nx1 label vector

X

the design matrix

one_stderr_rule

whether to use the one-standard-error rule when choosing lambda

Value

a list object containing a data.frame summarizing the error for each lambda, and the best lambda


vviers/DIYLassoElasticNet documentation built on May 30, 2019, 12:49 p.m.