LinearSolverState

class probnum.linalg.solvers.LinearSolverState(problem, prior, rng=None)[source]

Bases: object

State of a probabilistic linear solver.

The solver state separates the state of a probabilistic linear solver from the algorithm itself, making the solver stateless. The state contains the problem to be solved, the current belief over the quantities of interest and any miscellaneous quantities computed during an iteration of a probabilistic linear solver. The solver state is passed between the different components of the solver and may be used internally to cache quantities which are used more than once.

Parameters

Attributes Summary

action

Action of the solver for the current step.

actions

Actions taken by the solver.

observation

Observation of the solver for the current step.

observations

Observations of the problem by the solver.

residual

Cached residual \(Ax_i-b\) for the current solution estimate \(x_i\).

residuals

Residuals \(\{Ax_i - b\}_i\).

Methods Summary

next_step()

Advance the solver state to the next solver step.

Attributes Documentation

action

Action of the solver for the current step.

Is None at the beginning of a step and will be set by the policy.

Return type

Optional[ndarray]

actions

Actions taken by the solver.

Return type

Tuple[ndarray, …]

observation

Observation of the solver for the current step.

Is None at the beginning of a step, will be set by the observation model for a given action.

Return type

Optional[Any]

observations

Observations of the problem by the solver.

Return type

Tuple[Any, …]

residual

Cached residual \(Ax_i-b\) for the current solution estimate \(x_i\).

Return type

ndarray

residuals

Residuals \(\{Ax_i - b\}_i\).

Return type

Tuple[ndarray, …]

Methods Documentation

next_step()[source]

Advance the solver state to the next solver step.

Called after a completed step / iteration of the probabilistic linear solver.

Return type

None