Description Usage Arguments Value Author(s) References Examples
Computes the K-fold cross-validated mean squared prediction error for elastic net.
1 |
x |
Input to lars |
y |
Input to lars |
K |
Number of folds |
lambda |
Quadratic penalty parameter |
s |
Abscissa values at which CV curve should be computed. A value, or vector of values, indexing the path. Its values depends on the mode= argument |
mode |
Mode="step" means the s= argument indexes the LARS-EN step number. If mode="fraction", then s should be a number between 0 and 1, and it refers to the ratio of the L1 norm of the coefficient vector, relative to the norm at the full LS solution. Mode="norm" means s refers to the L1 norm of the coefficient vector. Abbreviations allowed. If mode="norm", then s should be the L1 norm of the coefficient vector. If mode="penalty", then s should be the 1-norm penalty parameter. |
trace |
Show computations? |
plot.it |
Plot it? |
se |
Include standard error bands? |
... |
Additional arguments to |
Invisibly returns a list with components (which can be plotted using plotCVLars
)
fraction |
Values of s |
cv |
The CV curve at each value of fraction |
cv.error |
The standard error of the CV curve |
Hui Zou and Trevor Hastie
Zou and Hastie (2005) "Regularization and Variable Selection via the Elastic Net" Journal of the Royal Statistical Society, Series B,76,301-320.
1 2 3 4 5 6 7 |
Loading required package: lars
Loaded lars 1.2
CV Fold 1
CV Fold 2
CV Fold 3
CV Fold 4
CV Fold 5
CV Fold 6
CV Fold 7
CV Fold 8
CV Fold 9
CV Fold 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.