lin: Linear kernel

Description Usage Arguments Details Value See Also Examples

Description

Construct a linear kernel.

Usage

1
lin(columns, sigma = 1, c = rep(0, 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

c

a scalar or vector parameter with continuous support giving the location on the x axis where y = 0 (an x-axis intercept)

Details

The linear kernel takes the form:

k_{lin}(\mathbf{x}, \mathbf{x}') = σ^2 (\mathbf{x} - c)(\mathbf{x}' - c)

where \mathbf{x} are the covariates on which the kernel is active, c determines the value(s) of x through which all realisations pass and σ^2 is a prior over the slopes of the realisations.

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, mat32, mat52, per, rbf, rq

Examples

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

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