saealib.AcquisitionFunction

class saealib.AcquisitionFunction[source]

Bases: ABC

Abstract base class for acquisition functions (infill criteria).

An acquisition function converts a SurrogatePrediction into a scalar score per candidate, which is used to rank candidates for true evaluation.

The AcquisitionFunction is completely decoupled from Surrogate: it knows nothing about how predictions are generated.

Methods

__init__

compute_reference

Compute the reference value required by this acquisition function.

score

Compute acquisition scores for a set of candidates.

Method Details

AcquisitionFunction.__init__()
abstract AcquisitionFunction.compute_reference(archive)[source]

Compute the reference value required by this acquisition function.

Called by SurrogateManager before scoring. Each acquisition function derives its appropriate reference from the archive. If self.reference is set (injected externally at construction or later), implementations should return it instead of computing from the archive, allowing users to supply domain knowledge or a fixed reference point.

Parameters:

archive (Archive) – Archive of evaluated solutions.

Returns:

Reference value passed to score. Return None if this acquisition function does not use a reference.

Return type:

Any

abstract AcquisitionFunction.score(prediction, reference)[source]

Compute acquisition scores for a set of candidates.

Parameters:
  • prediction (SurrogatePrediction) – Predictions from a surrogate model.

  • reference (Any) – Reference value produced by compute_reference.

Returns:

Acquisition scores. shape: (n_samples,) Higher scores indicate more promising candidates.

Return type:

np.ndarray