Description Usage Arguments Value
finds optimal lambda, given train and validation sets
1 2 | tune_lasso(lambda_max = 10, step_lambda = 0.1, ytrain, Xtrain, yvalid,
Xvalid)
|
lambda_max |
maximum lambda to try |
step_lambda |
step size between 0 and |
ytrain |
a nx1 label vector used for training |
Xtrain |
the design matrix used for training |
yvalid |
a nx1 label vector used for validating |
Xvalid |
the design matrix used for validating |
n_folds |
the number of folds to use in cross-validation |
one_stderr_rule |
whether to use the one-standard-error rule when choosing lambda |
a list object containing a data.frame summarizing the error for each pair of lambda/alpha, and the best lambda/alpha
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.