Description Usage Arguments Details Value References See Also Examples
Plots the cross-validation curve, and upper and lower standard
deviation curves, as a function of the lambda
values used.
1 2 |
x |
fitted |
sign.lambda |
Either plot against |
... |
Other graphical parameters to plot |
This is a port of plot.cv.glmnet
A plot is produced and nothing is returned
Jerome Friedman, Trevor Hastie, Robert Tibshirani (2010). Regularization Paths for Generalized Linear Models via Coordinate Descent. Journal of Statistical Software, 33(1), 1-22. http://www.jstatsoft.org/v33/i01/.
1 2 3 4 5 6 7 8 9 10 11 | data("sailsim")
f.basis <- function(i) splines::bs(i, degree = 3)
library(doParallel)
cl <- makeCluster(2)
registerDoParallel(cl)
cvfit <- cv.sail(x = sailsim$x, y = sailsim$y, e = sailsim$e,
parallel = TRUE, nlambda = 10,
maxit = 100, basis = f.basis,
nfolds = 3, dfmax = 10)
stopCluster(cl)
plot(cvfit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.