CovSEard: Squared Exponential Covariance Function with Automatic...

Description Details Warning Super class Public fields Methods

Description

The anisometric squared exponential covariance function, also called the squared exponential covariance function with automatic relevance determination.

Details

The anisometric squared exponential covariance function has D + 1 hyperparameters (where D is the number of dimensions in X), σ_f, the scale factor, and ell, a vector of characteristic length scales. The scale factor governs (on average) how far from the mean the function values can be, while the length scales govern how quickly the function can change given movement across a particular dimension of X; or, in other words, as the function output covariance is given as a function of distance in the covariate space, the length scale governs what "closeness" means, for each dimension. This can also be interpreted as determining the relative importance of dimensions, particularly for dichotomous dimensions of X (hence the moniker "automatic relevance determination").

The covariance between f(x_i) and f(x_j) is given by

k ( x_i, x_j ) = σ_f^2 exp [ ( x_i - x_j )^T M ( x_i - x_j ) ],

where M is a matrix whose dth diagonal entry is 1 / ell_d^2.

Warning

Note that the hyperparameters should be stored on the log scale; that is, you should supply the log of the scale factor and the log of the length scale (in that order).

Super class

gpmss::CovarianceFunction -> CovSEard

Public fields

name

A character vector of length one giving the covariance function's name; "anisotropic squared exponential"

hypers

A numeric vector giving the covariance function's hyperparameters; a vector of length D+1 giving the log of the scale factor and the log of the length scale, in that order

Methods

Public methods

Inherited methods

Method cov()

Compute function covariance

Usage
CovSEard$cov(X, Z = X, hypers = NULL)
Arguments
X

The first set of input values (should be a numeric matrix)

Z

The second set of input values (should be a numeric matrix); The default is Z = X.

hypers

A numeric vector giving hyperparameters for the covariance function. If NULL (the default), the hypers data member is used.


Method parameter_derivative()

Compute partial derivatives of covariance function with respect to its hyperparameters

Usage
CovSEard$parameter_derivative(X, Z = X, hypers = NULL, param = 1, K = NULL)
Arguments
X

The first set of input values (should be a numeric matrix)

Z

The second set of input values (should be a numeric matrix); The default is Z = X.

hypers

A numeric vector giving hyperparameters for the covariance function. If NULL (the default), the hypers data member is used.

param

An integer vector of length one; which element of hypers should the derivative be taken with respect to? If 1 (the default), the derivative is taken with respect to the (log of the) scale factor; if 2 or more, it is taken with respect to the param - 1 element of the (log of the) length scale.

K

An optional provision of the pre-computed kernel; this is useful if parameter_derivative() will be called repeatedly (for the different hypers) without the kernel itself changing


Method input_derivative()

Compute partial derivatives of covariance function with respect to its inputs

Usage
CovSEard$input_derivative(
  X,
  Z = X,
  hypers = NULL,
  dimension = 1,
  order = 1,
  K = NULL
)
Arguments
X

The first set of input values (should be a numeric matrix)

Z

The second set of input values (should be a numeric matrix); The default is Z = X.

hypers

A numeric vector giving hyperparameters for the covariance function. If NULL (the default), the hypers data member is used.

dimension

an integer vector of length one giving the dimension of X with respect to which the derivative is being taken; the default is 1

order

An integer vector of length one indicating whether the first partial derivative (order = 1) is desired, or the cross partial (order = 2); the default is 1

K

An optional provision of the pre-computed kernel; this is useful if parameter_derivative() will be called repeatedly (for the different hypers) without the kernel itself changing


Method new()

Create a new CovSEard object

Usage
CovSEard$new(hypers = c(0, 0))
Arguments
hypers

A numeric vector giving hyperparameters for the covariance function; a vector of length D+1 giving the log of the scale factor and the log of the length scale, in that order. If the provided hypers are of length two instead, the second element will be recycled as necessary to match the number of columns of X when used.


Method clone()

The objects of this class are cloneable with this method.

Usage
CovSEard$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


duckmayr/gpmss documentation built on Nov. 8, 2021, 5:48 a.m.