spleaf.cov.Cov.conditional_derivative#

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

Conditional mean and covariance of the derivative of the kernel part, or a subset of kernel terms, at new times \(t_2\), knowning the observed values \(y\).

Parameters:
y(n,) ndarray

The vector of observed values \(y\).

t2(n2,) ndarrays

The vector of new times.

calc_covFalse (default), True, or ‘diag’

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

Returns:
mu(n2,) ndarray

The vector of derivative 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’).

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.

Warning

This method should only be used with differentiable kernels. The ExponentialKernel and QuasiperiodicKernel are in the general case non-differentiable. All other kernels are differentiable.

While the computational cost of the derivative 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)\).