Gaussian processes#
This module provides a collection of tools that are useful when performing Gaussian process regression.
Numpy#
|
Gets matrix of differences between \(D\)-dimensional vectors x and xp i.e. |
|
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:
- x
numpy.ndarray
Array of inputs of shape
(N, D)
.- xp
numpy.ndarray
Array of inputs of shape
(Np, D)
.
- x
- Returns:
- XX
numpy.ndarray
Array of differences of shape
(N, Np)
.
- XX
- 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:
- x
numpy.ndarray
Array of shape
(N, D)
.- xp
numpy.ndarray
Array of shape
(Np, D)
.- sigmaffloat
The signal variance hyper-parameter
- lfloat
The length scale hyper-parameter
- x
- Returns:
- K
numpy.ndarray
Array of shape
(N, Np)
- K