# RandomUnitVectorPolicy¶

class probnum.linalg.solvers.policies.RandomUnitVectorPolicy(probabilities='uniform', replace=True)

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.

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
Returns

Next action to take.

Return type

action