class probnum.quad.RandomPolicy(sample_func, batch_size, rng=Generator(PCG64) at 0x7FD6AE2533C0)[source]

Bases: probnum.quad.solvers.policies._policy.Policy

Random sampling from an objective.

  • 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, n_dim).

  • batch_size (int) – Size of batch of nodes when calling the policy once.

Methods Summary


Find nodes according to the policy.

Methods Documentation


Find nodes according to the policy. :type bq_state: BQState :param bq_state: State of the BQ belief.


shape=(batch_size, input_dim) – Nodes found according to the policy.

Return type