spleaf.Spleaf.self_conditional#

Spleaf.self_conditional(y, calc_cov=False, index=None)#

Compute the conditional mean and covariance of the Gaussian process corresponding to the semiseparable part of the covariance matrix, knowning the observed values \(y\).

Parameters:
y(n,) ndarray

The vector of observed values \(y\).

calc_covFalse (default), True, or ‘diag’

Whether to output only the conditional mean (False), the mean and full covariance matrix (True), or the mean and main diagonal of the covariance matrix (‘diag’).

index(r’,) ndarray or None

Vector (of type int) giving the indices of semiseparable terms that should be considered for the Gaussian process. Other terms (semiseparable or leaf) are considered as noise. If index is None, all semiserable terms are considered for the Gaussian process.

Returns:
mu(n,) ndarray

The vector of conditional mean values.

cov(n, n) ndarray

Full covariance matrix (if calc_cov is True).

var(n,) ndarray

Main diagonal of the covariance matrix (if calc_cov is ‘diag’).

Warning

While the computational cost of the conditional mean scales as \(\mathcal{O}(n)\), the computational cost of the variance scales as \(\mathcal{O}(n^2)\), and the computational cost of the full covariance scales as \(\mathcal{O}(n^3)\).