Learn R Programming

rdetools (version 1.0)

modelimage: Model selection image

Description

The function produces a graphical illustration of a model selection which has been done with selectmodel. Strictly speaking it's a filled.contour plot in which additionally the relevant dimensions for the different models are drawn as a black line. selectmodel chooses the deepest point in this map, that is the model and the relevant dimension with the smallest loo-cv-error/negative-log-likelihood-value.

Usage

modelimage(model, color.palette = topo.colors, log = TRUE, plottitle = "RDE Model Selection", ...)

Arguments

model
list of model selection data as it has been returned by selectmodel
color.palette
color palette function to use, see rainbow
log
leave this TRUE, if the axis of the model parameter should be logarithmically scaled. Set this to FALSE if you want linear scaling.
plottitle
title of the plot
...
additional parameters for filled.contour

References

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

See Also

selectmodel, distimage, drawkpc, filled.contour, rainbow

Examples

Run this code
## model selection with RBF-kernel and graphical illustration
d <- sincdata(100, 0.1) # generate sinc data
# do model selection
m <- selectmodel(d$X, d$y, sigma = logspace(-3, 3, 100))
modelimage(m) # draw model selection image

Run the code above in your browser using DataLab