QuasisepSolver#
- class tinygp.solvers.QuasisepSolver(kernel: Kernel, X: JAXArray, noise: Noise, *, covariance: Any | None = None, assume_sorted: bool = False, parallel: bool = False)[source]#
Bases:
SolverA scalable solver that uses quasiseparable matrices
Take a look at the documentation for the solvers.quasisep package, for more technical details.
You generally won’t instantiate this object directly but, if you do, you’ll probably want to use the
QuasisepSolver.init()method instead of the usual constructor.- condition(kernel: Kernel, X_test: TypeAliasForwardRef('tinygp.helpers.JAXArray') | None, noise: Noise) Any[source]#
Compute the covariance matrix for a conditional GP
In the case where the prediction is made at the input coordinates with a
tinygp.kernels.quasisep.Quasisepkernel, this will return the quasiseparable representation of the conditional matrix. Otherwise, it will use scalable methods where possible, but return a dense representation of the covariance, so be careful when predicting at a large number of test points!- Parameters:
kernel – The kernel for the covariance between the observed and predicted data.
X_test – The coordinates of the predicted points. Defaults to the input coordinates.
noise – The noise model for the predicted process.
- dot_triangular(y: tinygp.helpers.JAXArray) tinygp.helpers.JAXArray[source]#
Compute a matrix product with the lower triangular linear system
If the covariance matrix is
K = L @ L.Tfor some lower triangular matrixL, this method returnsL @ yfor somey.
- normalization() tinygp.helpers.JAXArray[source]#
The multivariate normal normalization constant
This should be
(log_det + n*log(2*pi))/2, wherenis the size of the covariance matrix, andlog_detis the log determinant of the matrix.
- solve_triangular(y: tinygp.helpers.JAXArray, *, transpose: bool = False) tinygp.helpers.JAXArray[source]#
Solve the lower triangular linear system defined by this solver
If the covariance matrix is
K = L @ L.Tfor some lower triangular matrixL, this method solvesL @ x = yfor somey. If thetransposeparameter isTrue, this instead solvesL.T @ x = y.