Skip to contents

GpCovariance: kernel matrices (SE/ARD, Matern 3/2 and 5/2, rational quadratic, periodic, linear). GpPredict: exact regression (Rasmussen and Williams 2006, Algorithm 2.1) with the log marginal likelihood. GpSample: prior or posterior sample paths. GpFit: type-II maximum likelihood by Nelder-Mead and kernel selection. GpLoo: closed-form leave-one-out. Identical to the Python arm morie.fn.gproc.

Usage

GpCovariance(X1, X2, kernel = "se", ...)

GpPredict(X, y, Xnew, kernel = "se", noise = 1e-06, mean = 0, ...)

GpSample(
  X,
  kernel = "se",
  nsim = 1,
  seed = 1,
  data = NULL,
  noise = 1e-06,
  jitter = 1e-10,
  ...
)

GpFit(X, y, kernels = "se", mean = 0, init = NULL)

GpLoo(X, y, kernel = "se", noise = 1e-06, ...)

Arguments

X1, X2, X, Xnew

Input matrices.

kernel

Kernel name.

...

Kernel parameters (variance, lengthscale, period, alpha, bias).

y

Targets.

noise

Noise variance.

mean

Constant mean.

nsim

Number of paths.

seed

Philox seed.

data

list(X, y) for posterior sampling.

jitter

Diagonal jitter.

kernels

Candidate kernels.

init

Initial log parameters.

Value

Matrix or list.

References

Rasmussen, C. E. and Williams, C. K. I. (2006). Gaussian Processes for Machine Learning. MIT Press.

Examples

GpCovariance(matrix(0), matrix(c(0, 1)), "matern32")
#>      [,1]      [,2]
#> [1,]    1 0.4833577
GpPredict(matrix(c(0, 1)), c(0, 1), matrix(0.5), noise = 0.01)$mean
#> [1] 0.5459203