saealib.AcquisitionFunction#
- class saealib.AcquisitionFunction[ソース]#
ベースクラス:
ABCAbstract 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
Return the acquisition contract. |
|
Compute acquisition scores for a set of candidates. |
|
Compute a generation-scoped reference value shared across |
Method Details
- AcquisitionFunction.__init__()#
- 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, orNonefor 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_UNSETmeans "compute it now viaprepare(archive, ctx)"; an explicitNoneis a valid prepared value in its own right and skipsprepare().
- 戻り値:
scoresis 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
Noneby default.PointwiseAcquisitionoverrides it with thecompute_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