predict.GaussianProcess: Create Predictions Using a Gaussian Process

Description Usage Arguments Value Examples

View source: R/gp.R

Description

Returns the posterior mean and variance of a set of data points under a given Gaussian process

Usage

1
2
## S3 method for class 'GaussianProcess'
predict(gp.obj, data)

Arguments

gp.obj

A trained gaussianProcess object

data

Data to predict

Value

a list containing named elements:

Examples

1
2
3
4
5
6
7
8
9
x <- rnorm(50)
y <- sin(1/(x^2 + 0.15))
mt <- create.model.tree.builtin()
mt <- insert.kernel.instance(mt, 1, "SE", NULL, hyper.params=c(l=1))
gp <- create.gaussian.process(x, y, mt)
gp$fit.hyperparams(NA)

x1 <- rnorm(50)
y1.predicted <- predict(gp, x1)$mean

mattdneal/gaussianProcess documentation built on May 21, 2019, 12:58 p.m.