kpr {rdetools}R Documentation

Kernel projection regression

Description

The function does a kernel projection regression. It returns a function which predicts labels for new data points.

Usage

kpr(model,
    X = NULL,
    Xname = "X",
    Yname = "Y",
    kernel = NULL,
    regression = TRUE,
    ...)

Arguments

model list of rde data returned by rde or selectmodel
X matrix containing the data points, only needed if rde was used
Xname the name of the parameter of the kernel function which should contain the data points, only needed if rde was used
Yname the name of the parameter of the kernel function which should contain the 2nd data matrix
kernel kernel function to use, only needed if rde was used
regression set this to TRUE in case of a regression problem and to FALSE in case of a classification problem; only needed if rde was used
... parameters for the kernel function, only needed if rde was used

Value

function which predicts labels for new input data (gets a matrix with one data point per line)

Author(s)

Jan Saputra Mueller

References

M. L. Braun, J. M. Buhmann, K. R. Mueller (2008) _On Relevant Dimensions in Kernel Feature Spaces_

See Also

selectmodel

Examples

## kernel projection regression after
## calling selectmodel (recommended)
d <- sincdata(100, 0.1) # generate sinc data
# do model selection
m <- selectmodel(d$X, d$y, sigma = logspace(-3, 3, 100))
f <- kpr(m)
plot(f, -4, 4)

[Package rdetools version 1.0 Index]