Description Usage Arguments Details Value Examples
This function creates a gaussianProcess object along with associated functions for fitting hyperparameters.
1 | create.gaussian.process(x, y, kernel, cache = NULL)
|
x |
A matrix or data frame of predictor variables |
y |
A numeric vector of response variables |
kernel |
a Kernel object specifying the kernel for the Gaussian process |
cache |
a Cache object. If NULL, a cache is created |
Intend to rework this to fit the R S3 framework - it currently encloses all its methods to allow caching in optimx calls, but with a bit more experience I think this isn't actually necessary.
An untrained gaussianProcess object
1 2 3 4 5 6 7 | x <- rnorm(50)
y <- sin(1/(x^2 + 0.15))
mt <- create.model.tree.builtin()
mt <- insert.kernel.instance(mt, 1, "squaredExponential", NULL, hyper.params=c(l=NULL))
k <- create.kernel.object.from.model.tree(mt)
gp <- create.gaussian.process(x, y, k)
gp <- fit.hyperparams(gp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.