saealib.SMSEGOAcquisition#

class saealib.SMSEGOAcquisition(lam=1.0, reference_point=None, direction=None)[ソース]#

ベースクラス: PointwiseAcquisition

SMS-EGO acquisition function for multi-objective Bayesian optimisation.

Scores each candidate by the hypervolume improvement (HVI) of its per-objective LCB prediction over the current Pareto front (Ponweiser 2008; LCB formula from mlr3mbo AcqFunctionSmsEgo.R).

LCB per objective:

y_hat_j(x) = mu_j(x) - lambda * sigma_j(x)

Acquisition score:

SMS(x) = HV(P u {y_hat(x)}, r) - HV(P, r)

archive.f, reference_point, and the predicted mean are internally converted to minimisation convention via direction_to_minimize_sign (see direction below) before the formulas above run.

パラメータ:
  • lam (float) -- LCB width parameter λ. Default: 1.0 (mlr3mbo convention).

  • reference_point (array-like or None) -- Hypervolume reference point, given in raw objective space (i.e. in the same convention as problem.direction, not necessarily minimisation). If None, auto-computed from the archive nadir with a 10 % margin.

  • direction (np.ndarray or None) -- Per-objective optimization direction (+1 = maximize, -1 = minimize). shape: (n_obj,). None (default) means already-minimize, so behaviour for existing minimize-only callers is unchanged; when unset, it is auto-injected from problem.direction at run start.

Methods

__init__

compute_reference

Extract the Pareto front and (if needed) compute the reference point.

contract

Return the pointwise acquisition contract.

evaluate

Reject prediction is None, resolve the reference, then score().

prepare

Delegate to compute_reference(archive, rng=ctx.rng if ctx else None).

score

Compute hypervolume improvement of the LCB-predicted candidates.

Method Details

SMSEGOAcquisition.__init__(lam=1.0, reference_point=None, direction=None)[ソース]#
パラメータ:
  • lam (float)

  • reference_point (ArrayLike | None)

  • direction (ndarray | None)

戻り値の型:

None

SMSEGOAcquisition.compute_reference(archive, rng=None)[ソース]#

Extract the Pareto front and (if needed) compute the reference point.

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

  • rng (np.random.Generator | None)

戻り値:

(pareto_f, ref_point, base_hv) — non-dominated objective matrix, hypervolume reference point, and current hypervolume.

戻り値の型:

tuple

SMSEGOAcquisition.contract()#

Return the pointwise acquisition contract.

戻り値の型:

ComponentContract

SMSEGOAcquisition.evaluate(candidates_x, prediction, archive, ctx=None, *, prepared=<object object>)#

Reject prediction is None, resolve the reference, then score().

See AcquisitionFunction.evaluate() for the shared parameter contract, including the _UNSET vs. explicit prepared=None distinction.

パラメータ:
  • candidates_x (np.ndarray)

  • prediction (SurrogatePrediction | None)

  • archive (Archive)

  • ctx (OptimizationState | None)

  • prepared (Any)

戻り値の型:

AcquisitionResult

SMSEGOAcquisition.prepare(archive, ctx=None)#

Delegate to compute_reference(archive, rng=ctx.rng if ctx else None).

パラメータ:
  • archive (Archive)

  • ctx (OptimizationState | None)

戻り値の型:

Any

SMSEGOAcquisition.score(prediction, reference, rng=None)[ソース]#

Compute hypervolume improvement of the LCB-predicted candidates.

パラメータ:
  • prediction (SurrogatePrediction) -- Surrogate predictions. Must have std (has_uncertainty == True).

  • reference (tuple) -- (pareto_f, ref_point, base_hv) from compute_reference.

  • rng (Generator | None)

戻り値:

HVI scores. shape: (n_samples,). Higher is better.

戻り値の型:

np.ndarray

例外:

TypeError -- If prediction does not contain uncertainty estimates.