Fig2.9 | R Documentation |
Reproduces Figure 2.9 from the book; if you specify any options, your results may look different.
Fig2.9()
Fig2.9()
# By hand
attach_data(pollution)
cvfit <- cv.glmnet(std(X), y) # Standardize design matrix
rsq <- 1-cvfit$cvm/var(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.