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

View source: R/p.dcsvm.R

plot.dcsvmR Documentation

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 class 'dcsvm'
plot(x, xvar = c("norm", "lambda"), color = FALSE, label = FALSE, ...)

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.

Value

No return value, only called for plots.

See Also

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

Examples

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)


dcsvm documentation built on April 3, 2025, 10:27 p.m.