RandomPolicy¶
- class probnum.quad.solvers.policies.RandomPolicy(batch_size, sample_func)¶
Bases:
Policy
Random sampling from an objective.
- Parameters:
batch_size (IntLike) – Size of batch of nodes when calling the policy once.
sample_func (Callable) – The sample function. Needs to have the following interface: sample_func(batch_size: int, rng: np.random.Generator) and return an array of shape (batch_size, input_dim).
Attributes Summary
Whether the policy requires a random number generator when called.
Methods Summary
__call__
(bq_state, rng)Find nodes according to the policy.
Attributes Documentation
- requires_rng¶
Methods Documentation