gpflux.math#

Math utilities

Module Contents#

_cholesky_with_jitter(cov: gpflow.base.TensorType) tf.Tensor[source]#

Compute the Cholesky of the covariance, adding jitter (determined by gpflow.default_jitter()) to the diagonal to improve stability.

Parameters:

cov – full covariance with shape [..., N, D, D].

compute_A_inv_b(A: gpflow.base.TensorType, b: gpflow.base.TensorType) tf.Tensor[source]#

Computes \(A^{-1} b\) using the Cholesky of A instead of the explicit inverse, as this is often numerically more stable.

Parameters:
  • A – A positive-definite matrix with shape [..., M, M]. Can contain any leading dimensions (...) as long as they correspond to the leading dimensions in b.

  • b – Tensor with shape [..., M, D]. Can contain any leading dimensions (...) as long as they correspond to the leading dimensions in A.

Returns:

Tensor with shape [..., M, D]. Leading dimensions originate from A and b.