class probnum.linalg.solvers.MatrixBasedPLS(policy=<probnum.linalg.solvers.policies.ConjugateGradientPolicy object>, stopping_criterion=<probnum.LambdaStoppingCriterion object>)

Bases: ProbabilisticLinearSolver

Matrix-based probabilistic linear solver.

Probabilistic linear solver updating beliefs over the system matrix and its inverse. The solver makes use of prior information and iteratively infers the matrix and its inverse by matrix-vector multiplication.

This code implements the method described in Wenger et al. 1.

  • policy – Policy returning actions taken by the solver.

  • stopping_criterion – Stopping criterion determining when a desired terminal condition is met.



Wenger, J. and Hennig, P., Probabilistic Linear Solvers for Machine Learning, Advances in Neural Information Processing Systems (NeurIPS), 2020

Methods Summary

solve(prior, problem[, rng])

Solve the linear system.

solve_iterator(prior, problem[, rng])

Generator implementing the solver iteration.

Methods Documentation

solve(prior, problem, rng=None)

Solve the linear system.


  • belief – Posterior belief \((\mathsf{x}, \mathsf{A}, \mathsf{H}, \mathsf{b})\) over the solution \(x\), the system matrix \(A\), its (pseudo-)inverse \(H=A^\dagger\) and the right hand side \(b\).

  • solver_state – Final state of the solver.

Return type

Tuple[LinearSystemBelief, LinearSolverState]

solve_iterator(prior, problem, rng=None)

Generator implementing the solver iteration.

This function allows stepping through the solver iteration one step at a time and exposes the internal solver state.


solver_state – State of the probabilistic linear solver.

Return type

Generator[LinearSolverState, None, None]