
selectmodel(X, y, kernel = rbfkernel,
est_y = FALSE,
ydist = FALSE,
est_noise = FALSE,
regression = FALSE,
nmse = TRUE,
tcm = TRUE,
Xname = "X",
...)
distimage
)est_y
or est_noise
is TRUE. Set this
to TRUE if you want to force the function to handle the data as data for
a regression problem. If you leave this FALSE, the function will try to determine
itself whether this is a classification or regression problem.est_noise
is TRUE and the function is handling the data as data
of a regression problem. If you leave this TRUE, the normalized mean squared error is used
for estimating the noise level, otherwise the conventional mean squared error.X
by default and can be left as it is if you use rbfkernel
or polykernel
.rbfkernel
this is only the parameter sigma
of for polykernel
it's only the parameter d
. See examples.)est_y
, alldim
or est_noise
is TRUE, contains the denoised labels for the best modelest_noise
is TRUE, contains the estimated noise level for the best modeldistimage
rde
, modelimage
, distimage
, drawkpc
## model selection with RBF-kernel
d <- sincdata(100, 0.1) # generate sinc data
# do model selection, calculate also denoised labels
m <- selectmodel(d$X, d$y, est_y = TRUE, sigma = logspace(-3, 3, 100))
m$best # best model
m$rd # relevant dimension for best model
modelimage(m) # draw model selection image
## model selection with polynomial kernel
d <- sincdata(100, 0.1) # generate sinc data
# do model selection, calculate also denoised labels
m <- selectmodel(d$X, d$y, kernel = polykernel, est_y = TRUE, d = 1:20)
m$best # best model
m$rd # relevant dimension for best model
modelimage(m, log = FALSE) # draw model selection image
Run the code above in your browser using DataLab