spleaf.Spleaf.conditional#
- Spleaf.conditional(y, U2, V2, phi2, ref2left, phi2left, phi2right, calc_cov=False, index=None)#
Conditional mean and covariance at new abscissas 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\).
- U2, V2(n2, r) ndarrays
Symmetric semiseparable part at new abscissas, with preconditioning matrix phi2.
- phi2(n2-1, r) ndarray
Preconditioning matrix for the semiseparable part at new abscissas.
- ref2left(n2,) ndarray
Indices of the closest original abscissas to the left of new abscissas.
- phi2left(n2, r) ndarray
Preconditioning matrix linking new abscissas with their closest original abscissas to the left.
- phi2right(n2, r) ndarray
Preconditioning matrix linking new abscissas with their closest original abscissas to the right.
- 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(n2,) ndarray
The vector of conditional mean values.
- cov(n2, n2) ndarray
Full covariance matrix (if calc_cov is True).
- var(n2,) 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+n_2)\), the computational cost of the variance scales as \(\mathcal{O}(n n_2)\), and the computational cost of the full covariance scales as \(\mathcal{O}(n n_2^2)\).