create.gaussian.process: Create a gaussianProcess object

Description Usage Arguments Details Value Examples

View source: R/gp.R

Description

This function creates a gaussianProcess object along with associated functions for fitting hyperparameters.

Usage

1

Arguments

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

Details

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.

Value

An untrained gaussianProcess object

Examples

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)

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