Description Usage Arguments Examples
View source: R/my_ridge_xval.R
This function cross-validates a ridge regression model for out of sample accuracy for several lambdas, then finds the optimal lambda. We choose lambda that yields the lowest mean squared difference in out-of-sample residuals
1 | my_ridge_xval(f, d, lambdas, flds)
|
f |
a formula the data will be fit to |
d |
the data to be fit (a data frame) |
lambdas |
a vector of candidate ridge parameters |
flds |
a list of folds |
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.