saealib.AcquisitionFunction#

class saealib.AcquisitionFunction[ソース]#

ベースクラス: ABC

Abstract base class for acquisition functions (infill criteria).

An acquisition function converts a SurrogatePrediction (and/or the Archive) into a scalar score per candidate, which is used to rank candidates for true evaluation. It is completely decoupled from Surrogate/SurrogateManager: it knows nothing about how predictions are generated.

Methods

__init__

contract

Return the acquisition contract.

evaluate

Compute acquisition scores for a set of candidates.

prepare

Compute a generation-scoped reference value shared across evaluate() calls.

Method Details

AcquisitionFunction.__init__()#
AcquisitionFunction.contract()[ソース]#

Return the acquisition contract.

戻り値の型:

ComponentContract

abstractmethod AcquisitionFunction.evaluate(candidates_x, prediction, archive, ctx=None, *, prepared=<object object>)[ソース]#

Compute acquisition scores for a set of candidates.

パラメータ:
  • candidates_x (np.ndarray) -- Candidate design vectors. shape: (n_candidates, dim).

  • prediction (SurrogatePrediction or None) -- Surrogate predictions for candidates_x, or None for an archive-only acquisition that needs no prediction.

  • archive (Archive) -- Archive of evaluated solutions.

  • ctx (OptimizationState or None, optional) -- Optimization state, used here only for ctx.rng.

  • prepared (Any, optional) -- A previously computed reference value, as returned by prepare(). The default sentinel _UNSET means "compute it now via prepare(archive, ctx)"; an explicit None is a valid prepared value in its own right and skips prepare().

戻り値:

scores is an owned (n_candidates,) float64 array; higher is better.

戻り値の型:

AcquisitionResult

AcquisitionFunction.prepare(archive, ctx=None)[ソース]#

Compute a generation-scoped reference value shared across evaluate() calls.

Concrete hook returning None by default. PointwiseAcquisition overrides it with the compute_reference() behavior; archive-only acquisitions need not override it.

パラメータ:
  • archive (Archive) -- Archive of evaluated solutions.

  • ctx (OptimizationState or None, optional) -- Optimization state, used here only for ctx.rng.

戻り値:

A prepared reference value, passed to evaluate(..., prepared=...).

戻り値の型:

Any