mat52: Matern 5/2 kernel

Description Usage Arguments Details Value See Also Examples

Description

Construct a Matern 5/2 kernel.

Usage

1
mat52(columns, sigma = 1, l = rep(1, length(columns)))

Arguments

columns

a string vector giving the names of features on which the kernel acts. These will be used to access columns from a dataframe when the kernel is later used in a GP model.

sigma

a positive scalar parameter giving (the square-root of) the overall variance of the kernel

l

a positive scalar or vector parameter giving the characteristic lengthscale of the kernel (how rapidly the covariance decays with difference in the value of the covariate). Larger values of l imply less complex functions.

Details

The Matern 5/2 kernel takes the form:

k_{mat52}(\mathbf{x}, \mathbf{x}') = σ^2 ≤ft(1 + √{5} \mathbf{r} + \frac{5 \mathbf{r} ^ 2}{3}\right) exp(- √{5} \mathbf{r})

\mathbf{r} = {√{∑\limits_{d=1}^D ≤ft(\frac{(x_d - x_d')}{2l_d^2}\right) ^ 2}}

where \mathbf{x} are the covariates on which the kernel is active, l_d are the characteristic lengthscales for each covariate (column) x_d and σ^2 is the overall variance. Larger values of l_i correspond to functions which change less rapidly over the values of the covariates.

Value

A kernel object for which there are a range of associated functions, see kernel and access for details.

See Also

Other kernel.constructors: composition, expo, iid, int, lin, mat32, per, rbf, rq

Examples

1
2
3
4
5
6
7
8
9
# construct a kernel with one feature
k1 <- mat52('temperature')

# and another with two features
k2 <- mat52(c('temperature', 'pressure'))

# evaluate them on the pressure dataset
image(k1(pressure))
image(k2(pressure))

goldingn/gpe documentation built on May 17, 2019, 7:41 a.m.