saealib.MeanPrediction#
- class saealib.MeanPrediction(weights=None, reference=None, direction=None)[ソース]#
ベースクラス:
PointwiseAcquisitionAcquisition function based on predicted mean value (exploitation).
For single-objective problems, returns the predicted mean directly. For multi-objective problems, returns a weighted scalarization of the predicted mean.
A higher score indicates a more promising candidate. The sign convention follows the weight: use a negative weight for minimization (e.g., weights=np.array([-1.0])) so that lower objective values yield higher scores.
- パラメータ:
weights (np.ndarray or None) -- Weights for magnitude-aware scalarization of multi-objective predictions. shape: (n_obj,). If None and direction is also None, uses the first objective only.
direction (np.ndarray or None) -- Per-objective optimization directions (+1 = maximize, -1 = minimize). Used for direction-only scalarization when magnitude does not matter. Takes precedence over weights when both are provided. When unset, it is auto-injected from
problem.directionat run start.reference (Any)
Methods
Return fixed reference if set, otherwise None. |
|
Return the pointwise acquisition contract. |
|
Reject |
|
Delegate to |
|
Compute scores based on predicted mean. |
Method Details
- MeanPrediction.__init__(weights=None, reference=None, direction=None)[ソース]#
- パラメータ:
weights (ndarray | None)
reference (Any)
direction (ndarray | None)
- MeanPrediction.compute_reference(archive, rng=None)[ソース]#
Return fixed reference if set, otherwise None.
- パラメータ:
archive (Archive)
rng (np.random.Generator | None)
- 戻り値の型:
Any
- MeanPrediction.contract()#
Return the pointwise acquisition contract.
- 戻り値の型:
- MeanPrediction.evaluate(candidates_x, prediction, archive, ctx=None, *, prepared=<object object>)#
Reject
prediction is None, resolve the reference, thenscore().See
AcquisitionFunction.evaluate()for the shared parameter contract, including the_UNSETvs. explicitprepared=Nonedistinction.- パラメータ:
candidates_x (np.ndarray)
prediction (SurrogatePrediction | None)
archive (Archive)
ctx (OptimizationState | None)
prepared (Any)
- 戻り値の型:
AcquisitionResult
- MeanPrediction.prepare(archive, ctx=None)#
Delegate to
compute_reference(archive, rng=ctx.rng if ctx else None).- パラメータ:
archive (Archive)
ctx (OptimizationState | None)
- 戻り値の型:
Any
- MeanPrediction.score(prediction, reference=None, rng=None)[ソース]#
Compute scores based on predicted mean.
- パラメータ:
prediction (SurrogatePrediction) -- Surrogate predictions. prediction.value shape: (n_samples, n_obj)
reference (Any) -- Not used. Accepted for interface compatibility.
rng (Generator | None)
- 戻り値:
Scores. shape: (n_samples,)
- 戻り値の型:
np.ndarray