summary.svmpath: produce a summary of an svmpath object

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

View source: R/summary.svmpath.R

Description

printing an svmpath object can produce a lot of lines. The summary methods gives a more concise description by picking out a subset of the steps

Usage

1
2
## S3 method for class 'svmpath'
summary(object, nsteps = 5, digits = 6, ...)

Arguments

object

the svmpath object

nsteps

usually omitted, but can be changed to get longer summaries

digits

number of significant digits

...

additional arguments to the generic summary function

Details

Uses the pretty function to extract the approximately the desired number of steps. Always includes the first and last step.

Value

returns a dataframe with the steps, value of lambda, training error, size of elbow, number of support points, and the sum of the overlaps

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

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

Call:
svmpath(x = x, y = y, trace = TRUE, plot.it = TRUE)

Number of steps: 4 
Selected steps:
    Lambda Error Size.Elbow Support   SumEps
1 3.851000     2          2      12 8.698223
2 1.489298     3          0      10 8.633890
3 1.047224     3          2      10 8.057200
4 0.907920     3          3      10 8.002615

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