RandomUnitVectorPolicy¶
- class probnum.linalg.solvers.policies.RandomUnitVectorPolicy(probabilities='uniform', replace=True)¶
Bases:
LinearSolverPolicy
Policy returning randomly drawn standard unit vectors.
Draw a standard unit vector \(e_i\) at random and return it. This policy corresponds to selecting columns of the matrix as observations.
- Parameters
probabilities (str) – Probabilities with which to choose different columns. Either uniform or rownorm.
replace – Whether to sample with or without replacement.
- 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 (LinearSolverState) – Current state of the linear solver.
- Returns
Next action to take.
- Return type
action