rbf: Radial basis function kernel

Description Usage Arguments Details Value See Also Examples

Description

Construct a radial basis function (A.K.A. squared-exponential) kernel.

Usage

1
rbf(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 rbf kernel takes the form:

k_{rbf}(\mathbf{x}, \mathbf{x}') = σ^2 exp≤ft(-\frac{\mathbf{r} ^ 2}{2}\right)

\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 in 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, mat52, per, rq

Examples

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

# and another with two features
k2 <- rbf(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.