spleaf.cov.Cov.self_conditional#

Cov.self_conditional(y, calc_cov=False, kernel=None)#

Conditional mean and covariance of the kernel part, or a subset of kernel terms, 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’).

kernellist or None

List of kernel identifiers that should be considered for the Gaussian process. Other terms (kernel or noise) are considered as noise. If kernel is None, all kernel 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)\).