Learn R Programming

svmpath (version 0.970)

plot.svmpath: plot the svm solution at a step along the path

Description

produces a plot of the svm solution along the path, and optinally indicates support points

Usage

# S3 method for svmpath
plot(x, step, Size = 60, elbow.show = TRUE, support.show = TRUE, ...)

Arguments

x

the svmpath object

step

which step to plot; default is the last step. Use summary to see how many steps

Size

If the solution is non-linear, this is the gridsize for countour

elbow.show

Should the points on the elbow be indicated

support.show

Should the support points be indicated

additional arguments to plot, allowing one to change, for example, "main", "xlab" etc

Value

A list is returned silently, with the ingredients of the plot

Details

A two-dimensional plot is produced of the SVM solution. Makes sense only if X is two-dimensional. If not, the first two dimensions will be used

References

The paper http://www-stat.stanford.edu/~hastie/Papers/svmpath.pdf, as well as the talk http://www-stat.stanford.edu/~hastie/TALKS/svmpathtalk.pdf.

See Also

coef.svmpath, svmpath, predict.svmpath, print.svmpath,summary.svmpath

Examples

Run this code
# NOT RUN {
data(svmpath)
attach(balanced.overlap)
fit <- svmpath(x,y,trace=TRUE,plot=FALSE)
plot(fit,step=2)
detach(2)
# }

Run the code above in your browser using DataLab