EqxLearnUncertainty

class EqxLearnUncertainty(initial_models=10, batch_size=1, num_grid_per_dim=1024, grid_sampler=LatinHypercube(), surrogate=None, fit_kwargs=<factory>)[source]

Bases: FieldSampler

Adaptive sampler targeting regions of high surrogate uncertainty.

Parameters:
surrogate: Any = None
fit_kwargs: dict
train_field(params, features, key)[source]
Parameters:
  • params (Array)

  • features (Array)

  • key (Array)

Return type:

Any

evaluate_field(field, theta, key)[source]
Parameters:
  • field (Any)

  • theta (Array)

  • key (Array)

Return type:

float

batch_size: int = 1
grid_sampler: AbstractOneShotSampler = LatinHypercube()
init(eval_fn, d, key, options)

Initialize the sampler state and perform the first evaluations.

Return type:

SamplerState

initial_models: int = 10
num_grid_per_dim: int = 1024
step(eval_fn, d, state, key, options)

Perform one iteration of the sampling algorithm.

Return type:

SamplerState

terminate(state, target_N)

Determine whether the sampling loop should stop.

Parameters:
  • state (SamplerState)

  • target_N (int)

Return type:

bool