sde_kernel: Create a gaussian process' kernel

Description Usage Arguments Value See Also Examples

Description

Creates a kernel defining the properties of a gaussian process

Usage

1
2
3
sde_kernel(type = c("exp_kernel", "rq_kernel", "sum_exp_kernels",
  "exp_const_kernel", "clamped_exp_lin_kernel"), parameters,
  inputDimension = 1, epsilon = 0)

Arguments

type

A string specifying the type of kernel to create

parameters

A NAMED list with the parameters that the kernel needs for its proper creation. The easiest way of seeing which parameters are required is to make this function fail. For example: sde_kernel("exp_kernel",list())

inputDimension

The input dimension of the kernel

epsilon

A small value to be added to the diagonal of the kernel covariance matrices to regularize them. This improves the numerical stability of the computations.

Value

A sde_kernel S3 object

See Also

covmat, autocovmat, vars, get_hyperparams, set_hyperparams, decrease_upper_bound and increase_lower_bound

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# See demo/ornstein for a complete example
data("ornstein")
uncertainty = 5
inputDim = 1
# A small value to regularize covariance matrices
epsilon = 1e-5
# Create a exponential kernel with lengthScale = 1 and amplitude = uncertainty
# to model the drift function. We may select the amplitude from the fact that it
# is a gaussian process and the 95% confidence interval would be
# (-2 * sqrt(amplitude), 2 * sqrt(amplitude)).
driftKer = sde_kernel("exp_kernel",
                      list('amplitude' = uncertainty,
                           'lengthScales' = 1),
                      inputDim, epsilon)
# The selection of the amplitude parameters for gaussian process modelling the
# diffusion term is more complicated since voila actually uses a lognormal
# process. This function helps with the selection of the parameters from
# an uncertainty parameter and the time series
diffPars = select_diffusion_parameters(ornstein, deltat(ornstein),
                                       priorOnSd = uncertainty)
# Create another exponential kernel with lengtScale=1
diffKer = sde_kernel("exp_kernel",
                      list('amplitude' = diffPars$kernelAmplitude,
                           'lengthScales' = 1),
                      inputDim, epsilon)

citiususc/voila documentation built on May 13, 2019, 7:30 p.m.