FieldSampler
- class FieldSampler(initial_models=10, batch_size=1, num_grid_per_dim=1024, grid_sampler=LatinHypercube())[source]
Bases:
AbstractAdaptiveSamplerSamples new points at the maxima of a learned scalar field.
- Parameters:
initial_models (int)
batch_size (int)
num_grid_per_dim (int)
grid_sampler (AbstractOneShotSampler)
- grid_sampler: AbstractOneShotSampler = LatinHypercube()
- abstractmethod train_field(params, features, key)[source]
- Parameters:
params (Array)
features (Array)
key (Array)
- Return type:
- step(eval_fn, d, state, key, options)[source]
Perform one iteration of the sampling algorithm.
- Return type:
SamplerState
- init(eval_fn, d, key, options)
Initialize the sampler state and perform the first evaluations.
- Return type:
SamplerState