GradientPolicy¶
- class itergp.methods.policies.GradientPolicy(precond_inv=None)¶
Bases:
LinearSolverPolicyGradient / residual policy.
Policy returning gradients / residuals \(b - Ax_i\) as actions. If the inverse of a preconditioner is supplied, returns \(P^{-1}(b-Ax_i)\) instead.
- Parameters
precond_inv (Optional[LinearOperatorLike]) – Inverse \(P^{-1}\) of the preconditioner.
- Return type
None
Attributes Summary
Preconditioner inverse.
Methods Summary
__call__(solver_state, rng)Return an action for a given solver state.
Attributes Documentation
- precond_inv¶
Preconditioner inverse.
Methods Documentation
- __call__(solver_state, rng)[source]¶
Return an action for a given solver state.
- Parameters
solver_state (probnum.linalg.solvers.LinearSolverState) – Current state of the linear solver.
rng (Optional[SeedSequence]) – Random number generator.
- Returns
Next action to take.
- Return type
action