LinearSolverState

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

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.

belief

Belief over the quantities of interest of the linear system.

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\).

step

Current step of the solver.

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, ...]

belief

Belief over the quantities of interest of the linear system.

Return type

LinearSystemBelief

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, ...]

step

Current step of the solver.

Return type

int

Methods Documentation

next_step()[source]

Advance the solver state to the next solver step.

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

Return type

None