We make use of Gaussian Processes in several places in
EpiNow2
. For example, the default model for
estimate_infections()
uses a Gaussian Process to model the
1st order difference on the log scale of the reproduction number. This
vignette describes the implementation details of the approximate
Gaussian Process used in EpiNow2
.
The single dimension Gaussian Processes (𝒢𝒫t) we use can be written as
where μ(t) and k(t, t′) are the mean and covariance functions, respectively. In our case as set out above, we have
with the following choices available for the kernel k
with ρ > 0 and α > 0 the length scale and magnitude, respectively, of the kernel. Note that here and later we use a slightly different definition of α compared to Riutort-Mayol et al.[1], where this is defined as our α2.
In order to make our models computationally tractable, we approximate the Gaussian Process using a Hilbert space approximation to the Gaussian Process[1], centered around mean zero.
with m the number of basis functions to use in the approximation, which we calculate from the number of time points tGP to which the Gaussian Process is being applied (rounded up to give an integer value), as is recommended[1].
and values of λj given by
where L is a positive number termed boundary condition, and βj are regression weights with standard normal prior
The function Sk(x) is the spectral density relating to a particular covariance function k. In the case of the Matérn kernel of order ν this is given by
For ν = 3/2 (the default in
EpiNow2
) this simplifies to
For ν = 1/2 it is
and for ν = 5/2 it is
In the case of a squared exponential the spectral kernel density is given by
The functions ϕj(x) are the eigenfunctions of the Laplace operator,
with time rescaled linearly to be between -1 and 1,
Relevant priors are
with ρ additionally constrained to be between ρmin and ρmax, μρ and σρ calculated from given mean mρ and standard deviation sρ, and default values (all of which can be changed by the user):