LinearSolverPolicy¶
- class probnum.linalg.solvers.policies.LinearSolverPolicy¶
Bases:
ABCPolicy of a (probabilistic) linear solver.
The policy \(\pi(s \mid \mathsf{A}, \mathsf{H}, \mathsf{x}, A, b)\) of a linear solver returns a vector to probe the linear system with, typically via multiplication, resulting in an observation. Policies can either be deterministic or stochastic depending on the application.
See also
ConjugateDirectionsPolicyPolicy returning \(A\)-conjugate actions.
RandomUnitVectorPolicyPolicy returning random standard unit vectors.
Methods Summary
__call__(solver_state[, rng])Return an action for a given solver state.
Methods Documentation
- abstract __call__(solver_state, rng=None)[source]¶
Return an action for a given solver state.
- Parameters:
solver_state (LinearSolverState) – Current state of the linear solver.
rng (Generator | None) – Random number generator.
- Returns:
Next action to take.
- Return type:
action