kpr {rdetools} | R Documentation |
The function does a kernel projection regression. It returns a function which predicts labels for new data points.
kpr(model, X = NULL, Xname = "X", Yname = "Y", kernel = NULL, regression = TRUE, ...)
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 |
function which predicts labels for new input data (gets a matrix with one data point per line)
Jan Saputra Mueller
M. L. Braun, J. M. Buhmann, K. R. Mueller (2008) _On Relevant Dimensions in Kernel Feature Spaces_
## 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)