plot.svmpath function

plot the svm solution at a step along the path

plot the svm solution at a step along the path

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

## S3 method for class '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

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

Returns

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

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.

Author(s)

Trevor Hastie

See Also

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

Examples

data(svmpath) attach(balanced.overlap) fit <- svmpath(x,y,trace=TRUE,plot=FALSE) plot(fit,step=2) detach(2)