Learn R Programming

dcsvm (version 0.0.1)

plot.dcsvm: Plot Coefficients for Sparse Density-Convoluted SVM

Description

Plots the solution paths as a coefficient profile plot for a fitted dcsvm model.

Usage

# S3 method for dcsvm
plot(x, xvar = c("norm", "lambda"), color = FALSE, label = FALSE, ...)

Value

No return value, only called for plots.

Arguments

x

A fitted dcsvm model.

xvar

Specifies the X-axis. If xvar == "norm", plots against the L1-norm of the coefficients; if xvar == "lambda", plots against the log-lambda sequence.

color

If TRUE, plots the curves with rainbow colors; otherwise, with gray colors (default).

label

If TRUE, labels the curves with variable sequence numbers. Default is FALSE.

...

Other graphical parameters to plot.

Details

Plot Coefficients for Sparse Density-Convoluted SVM

Plots the solution paths for a fitted dcsvm object.

This function generates a coefficient profile plot showing the solution paths of the sparse density-convoluted SVM.

See Also

print.dcsvm, predict.dcsvm, coef.dcsvm, plot.dcsvm, and cv.dcsvm.

Examples

Run this code
data(colon)
fit <- dcsvm(colon$x, colon$y)
oldpar <- par(mfrow = c(1,3)) #changes par() and stores original par()
# Plots against the L1-norm of the coefficients
plot(fit)
# Plots against the log-lambda sequence
plot(fit, xvar="lambda", label=TRUE)
# Plots with colors
plot(fit, color=TRUE)
# Reset to user's option
par(oldpar)

Run the code above in your browser using DataLab