gp_conditional: Reconstruct a Gaussian Process conditional on some data.

Description Usage Arguments Value Notes See Also

View source: R/gp_functions.R

Description

gp_conditional returns mean and covariance of a GP given data.

Usage

1
2
gp_conditional(theta, acv.model = NULL, dat = NULL, t.star = NULL,
  PDcheck = FALSE)

Arguments

theta

(vector) parameters for covariance function the first element is the mean value mu

acv.model

(name) name of the function to compute ACV(tau | theta)

dat

(matrix) an N * 3 matrix of data: 3 columns

t.star

(vector) times at which to compute the simulation(s).

PDcheck

(logical) use Matrix::nearPD to coerse the matrix

Value

A list containing:

t

prediction times (same as t.star.)

y

mean of GP model at times t.

dy

standard deviation of GP model at times t.

cov

The full m*m covariance matrix.

Notes

Compute the expectation of the GP with covariance matrix specified by (hyper-)parameters 'theta' at times t.star based on observations y at times t (in the dat input). Uses eqn 2.23 of Rasmussen & Williams (2006).

This may be used for interpolation (between available time points) or prediction/extrapolation (beyond the range of available time points). I consider both of these as aspects of ‘reconstruction’.

In practice we compute E[y(t.star)] given y(t.obs) and theta. This is the mean (as a function of time) of the GP proceess (with specified ACV) that is conditional on the givendata. We compute not just the mean but the full covariance matrix for times t.star: C[i,j] = ACV(t.star[i], t.star[j]). This may be a large matrix. Also returns dy = sqrt(diag(cov)).

See Also

gp_sim, rmvnorm


svdataman/gin documentation built on March 12, 2021, 7:37 a.m.