AbstractOneShotSampler

class AbstractOneShotSampler[source]

Bases: AbstractSampler

One-shot samplers generate all points immediately during init. step is effectively a no-op, and terminate always returns True.

abstractmethod generate(N, d, key)[source]

Propose N points within the unit hypercube.

Parameters:
Return type:

Array

init(eval_fn, d, key, options)[source]

Initialize the sampler state and perform the first evaluations.

Return type:

SamplerState

step(eval_fn, d, state, key, options)[source]

Perform one iteration of the sampling algorithm.

Return type:

SamplerState

terminate(state, target_N)[source]

Determine whether the sampling loop should stop.

Return type:

bool