Description Usage Arguments Details Value Author(s) References See Also Examples
k-fold Cross Validation for L2 Cyclic Coordinate Descent
1 | cv.l2.reg(x, y, k, lam.vec)
|
x |
|
y |
Outcome of length |
k |
Number of folds for k-fold cross validation |
lam.vec |
Vector of penalization parameters |
K-fold cross validation to select optimal lambda for use in cyclic coordinate descent for L2 regression l2.reg
. The optimal value is considered the lambda
value that retuns the lowest prediction error over the cross validation. If more than one lambda
value give the minumum testing error, the smallest lambda
is selected.
Plot of the cross validation can be viewed through plot.cv.l2.reg
k |
The value of |
lam.vec |
The values of lambda tested. |
mean.error |
The mean error corresponding to each lambda across k-folds |
lam.opt |
The determined lambda value among |
error.cv |
The prediction error matrix returned by cross validation method. |
num.pred |
The number of predictors selected for the corresponding |
Edward Grant, Kenneth Lange, Tong Tong Wu
Maintainer: Edward Grant edward.m.grant@gmail.com
Wu, T.T. and Lange, K. (2008). Coordinate Descent Algorithms for Lasso Penalized Regression. Annals of Applied Statistics, Volume 2, No 1, 224-244.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.