gpcov: Conditional covariance of Gaussian process given observations

View source: R/utilities.R

gpcovR Documentation

Conditional covariance of Gaussian process given observations

Description

Compute the conditional covariance of a Gaussian process, given a vector of observations, hyper-parameters phi, and noise standard deviation sigma.

Usage

gpcov(yobs, tvec, tnew, phi, sigma, kerneltype = "generalMatern")

Arguments

yobs

vector of observations

tvec

vector of time points corresponding to observations

tnew

vector of time points at which the conditional covariance should be computed

phi

vector of hyper-parameters for the covariance kernel (kerneltype)

sigma

the noise level (if known). By default, both phi and sigma are estimated. If a value for sigma is supplied, then sigma is held fixed at the supplied value and only phi is estimated.

kerneltype

the covariance kernel, types matern, rbf, compact1, periodicMatern, generalMatern are supported. See calCov for their definitions.

Value

The conditional covariance matrix for the GP evaluated at the time points in tnew.

Examples

# Load Fitzhugh-Nagumo dataset
data(FNdat)

tnew <- seq(15, 20, by = 0.5)

# GP covariance of V component at time points in tnew given observations
gpcov(FNdat$V, FNdat$time, tnew, c(2.3, 1.2), 0.2)


magi documentation built on April 26, 2023, 1:12 a.m.