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

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/plot.svmpath.R

Description

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

Usage

1
2
## 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

Value

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

Author(s)

Trevor Hastie

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

1
2
3
4
5

Example output

Loaded svmpath 0.955

1:	Obs 11	 ->E  lambda = 3.851000  Sum Eps = 8.7 Elbow = 2 Error = 2
1:	Obs 6	 ->E  lambda = 3.851000  Sum Eps = 8.7 Elbow = 2 Error = 2
2:	Obs 11	E->R  lambda = 1.489298  Sum Eps = 8.63 Elbow = 0 Error = 3
2:	Obs 6	E->R  lambda = 1.489298  Sum Eps = 8.63 Elbow = 0 Error = 3
3:	Obs 12	 ->E  lambda = 1.047224  Sum Eps = 8.06 Elbow = 2 Error = 3
3:	Obs 3	 ->E  lambda = 1.047224  Sum Eps = 8.06 Elbow = 2 Error = 3
4:	Obs 1	L->E  lambda = 0.907920  Sum Eps = 8 Elbow = 3 Error = 3

svmpath documentation built on July 14, 2020, 5:06 p.m.