radial.kernel: compute the kernel matrix for svmpath

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

Description

compute the kernel matrix for svmpath

Usage

1
2
radial.kernel(x, y=x, param.kernel = 1/p,...)
poly.kernel(x, y=x, param.kernel = 1,...)

Arguments

x

an n x p matrix of features

y

an m x p matrix of features (if omitted, it defaults to x)

param.kernel

the parameter(s) for the kernel. For this radial kernel, the parameter is known in the fields as "gamma". For the polynomial kernel, it is the "degree"

...

unused

Details

For the radial kernel, this computes the function exp(-g||x-y||^2) for each pair of rows x,y from the input matrices. Here g is param.kernel. For the polynomial kernel, it computes (xy'+1)^d, where d is param.kernel.

Value

An n x m matrix.

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

svmpath

Examples

1
2
3
4

Example output

Loaded svmpath 0.955

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