Gaussian processes

This module provides a collection of tools that are useful when performing Gaussian process regression.

Numpy

abs_diff(x, xp)

Gets matrix of differences between \(D\)-dimensional vectors x and xp i.e.

exponential_squared(x, xp, sigmaf, l[, pspec])

Create exponential squared covariance function between \(D\) dimensional vectors \(x\) and \(x_p\) i.e.

africanus.gps.abs_diff(x, xp)[source]

Gets matrix of differences between \(D\)-dimensional vectors x and xp i.e.

\[X_{ij} = |x_i - x_j|\]
Parameters
xnumpy.ndarray

Array of inputs of shape (N, D).

xpnumpy.ndarray

Array of inputs of shape (Np, D).

Returns
XXnumpy.ndarray

Array of differences of shape (N, Np).

africanus.gps.exponential_squared(x, xp, sigmaf, l, pspec=False)[source]

Create exponential squared covariance function between \(D\) dimensional vectors \(x\) and \(x_p\) i.e.

\[k(x, x_p) = \sigma_f^2 \exp\left(-\frac{(x-x_p)^2}{2l^2}\right)\]
Parameters
xnumpy.ndarray

Array of shape (N, D).

xpnumpy.ndarray

Array of shape (Np, D).

sigmaffloat

The signal variance hyper-parameter

lfloat

The length scale hyper-parameter

Returns
Knumpy.ndarray

Array of shape (N, Np)