AutoPreconditionedGradientPolicy¶
- class itergp.methods.policies.AutoPreconditionedGradientPolicy(precond_iter, precond_policy=<itergp.methods.policies.UnitVectorPolicy object>)¶
Bases:
objectPolicy which first constructs a preconditioner on the fly and then returns preconditioned gradient actions.
This policy constructs a diagonal-plus-low-rank preconditioner by first using a
precond_policyforprecond_sizesteps. Afterwards the policy returns preconditioned gradients as actions using the previously constructed preconditioner.- Parameters
precond_iter (int) – Number of iterations to use for preconditioner construction. Equivalently, the rank of the low-rank component of the preconditioner (inverse).
precond_policy (Tuple[linalg.solvers.policies.LinearSolverPolicy]) – Policy to use for the first
precond_sizeiterations, which determines the constructed preconditioner. Defaults to aUnitVectorPolicy, which is equivalent to preconditioning with a partial Cholesky factorization.
- Return type
None
Methods Summary
__call__(solver_state, rng)Return an action for a given solver state.
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