CovSEiso: Isotropic Squared Exponential Covariance Function

Description Details Warning Super class Public fields Methods

Description

The isometric squared exponential covariance function, also called the Gaussian kernel, the squared exponential kernel, or the radial basis function.

Details

The isometric squared exponential covariance function has two hyperparameters, σ_f, the scale factor, and ell, the characteristic length scale. The scale factor governs (on average) how far from the mean function values can be, while the length scale governs how quickly the function can change; 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.

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 diagonal entries are 1 / ell^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 -> CovSEiso

Public fields

name

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

hypers

A numeric vector giving the covariance function's hyperparameters; a vector of length two 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
CovSEiso$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
CovSEiso$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, it is taken with respect to 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
CovSEiso$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 CovSEiso object

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

A numeric vector giving hyperparameters for the covariance function; a vector of length two giving the log of the scale factor and the log of the length scale, in that order


Method clone()

The objects of this class are cloneable with this method.

Usage
CovSEiso$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


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