gpmean {magi} | R Documentation |
Conditional mean of Gaussian process given observations
Description
Compute the conditional mean of a Gaussian process (and optionally, its derivative), given a vector of observations, hyper-parameters phi
, and noise standard deviation sigma
.
Usage
gpmean(
yobs,
tvec,
tnew,
phi,
sigma,
kerneltype = "generalMatern",
deriv = FALSE
)
Arguments
yobs |
vector of observations |
tvec |
vector of time points corresponding to observations |
tnew |
vector of time points at which the conditional mean should be computed |
phi |
vector of hyper-parameters for the covariance kernel ( |
sigma |
the noise level (if known). By default, both |
kerneltype |
the covariance kernel, types |
deriv |
logical; if true, the conditional mean of the GP's derivative is also computed |
Value
A vector with the values of the conditional mean function evaluated at the time points in tnew
. If deriv = TRUE
, returned with an additional attribute deriv
that contains the values of the conditional mean of the GP derivative evaluated at the time points in tnew
.
Examples
# Load Fitzhugh-Nagumo dataset
data(FNdat)
tnew <- seq(0, 20, by = 0.5)
# GP mean of V component at time points in tnew given observations
gpmean(FNdat$V, FNdat$time, tnew, c(2.3, 1.2), 0.2)