ConjugateGradientPolicy¶
- class itergp.methods.policies.ConjugateGradientPolicy(precond_inv=None, reorthogonalization_fn_residual=None)¶
Bases:
LinearSolverPolicyPolicy returning \(A\)-conjugate actions.
Selects the negative gradient / residual as an initial action \(s_0 = b - A x_0\) and then successively generates \(A\)-conjugate actions, i.e. the actions satisfy \(s_i^\top A s_j = 0\) iff \(i \neq j\). If a preconditioner inverse \(P^{-1}\) is supplied, the actions are orthogonal with respect to the \(P^{-\frac{1}{2}}AP^{-\frac{\top}{2}}\) inner product.
- Parameters
precond_inv (Optional[LinearOperatorLike]) – Preconditioner inverse.
reorthogonalization_fn_residual (Optional[Callable[[backend.Array, Iterable[backend.Array], linops.LinearOperator], backend.Array]]) – Reorthogonalization function, which takes a vector, an orthogonal basis and optionally an inner product and returns a reorthogonalized vector. If not None the residuals are reorthogonalized before the action is computed.
- Return type
None
Methods Summary
__call__(solver_state[, rng])Return an action for a given solver state.
Methods Documentation
- __call__(solver_state, rng=None)[source]¶
Return an action for a given solver state.
- Parameters
solver_state (probnum.linalg.solvers.LinearSolverState) – Current state of the linear solver.
- Returns
Next action to take.
- Return type
action