RandomMaxAcquisitionPolicy

class probnum.quad.solvers.policies.RandomMaxAcquisitionPolicy(batch_size, acquisition_func, n_candidates)

Bases: Policy

Policy that maximizes an acquisition function by sampling random candidate nodes.

The candidate nodes are random draws from the integration measure. The node with the largest acquisition value is chosen.

Parameters:
  • batch_size (IntLike) – Size of batch of nodes when calling the policy once (must be equal to 1).

  • acquisition_func (AcquisitionFunction) – The acquisition function.

  • n_candidates (IntLike) – The number of candidate nodes.

Raises:

ValueError – If batch_size is not 1, or if n_candidates is too small.

Attributes Summary

requires_rng

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

__call__(bq_state, rng)[source]

Find nodes according to the policy.

Parameters:
  • bq_state (BQState) – State of the BQ belief.

  • rng (Generator | None) – A random number generator.

Returns:

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

Return type:

nodes