plot.sparseSVM {sparseSVM} | R Documentation |
Plot coefficients from a "sparseSVM" object
Description
Produce a plot of the coefficient paths for a fitted
"sparseSVM"
object.
Usage
## S3 method for class 'sparseSVM'
plot(x, xvar = c("lambda", "norm"), log.l = TRUE, nvars = TRUE,
alpha = 1, ...)
Arguments
x |
A |
xvar |
What is on the X-axis. |
log.l |
Should |
nvars |
If |
alpha |
A value between 0 and 1 for alpha transparency channel(0 means transparent and 1 means opaque), helpful when the number of variables is large. |
... |
Other graphical parameters to |
Author(s)
Congrui Yi and Yaohui Zeng
Maintainer: Congrui Yi <eric.ycr@gmail.com>
See Also
Examples
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))
fit = sparseSVM(X, y)
par(mfrow = c(2,2))
plot(fit)
plot(fit, nvars = FALSE, alpha = 0.5)
plot(fit, log.l = FALSE)
plot(fit, xvar = "norm")
[Package sparseSVM version 1.1-6 Index]