View source: R/plot.cv.sparseSVM.R
| plot.cv.sparseSVM | R Documentation | 
Plot the cross-validation curve for a "cv.sparseSVM" object against the 
lambda values used, along with standard error bars.
## S3 method for class 'cv.sparseSVM'
plot(x, log.l = TRUE, nvars = TRUE, ...)
x | 
 A   | 
log.l | 
 Should   | 
nvars | 
 If   | 
... | 
 Other graphical parameters to   | 
Produces a plot of mean cv errors at each lambda along with upper and lower standard error bars.
Congrui Yi and Yaohui Zeng 
Maintainer: Congrui Yi <eric.ycr@gmail.com>
sparseSVM, cv.sparseSVM
X = matrix(rnorm(1000*100), 1000, 100)
b = 3
w = 5*rnorm(10)
eps = rnorm(1000)
y = sign(b + drop(X[,1:10] %*% w + eps))
cv.fit <- cv.sparseSVM(X, y, ncores = 2, seed = 1234)
plot(cv.fit)
plot(cv.fit, log.l = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.