saealib.SMSEGOAcquisition#

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

Bases: 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.

Parameters:
  • 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)[source]#
Parameters:
  • lam (float)

  • reference_point (ArrayLike | None)

  • direction (ndarray | None)

Return type:

None

SMSEGOAcquisition.compute_reference(archive, rng=None)[source]#

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

Parameters:
  • archive (Archive) – Archive of evaluated solutions.

  • rng (np.random.Generator | None)

Returns:

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

Return type:

tuple

SMSEGOAcquisition.contract()#

Return the pointwise acquisition contract.

Return type:

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.

Parameters:
  • candidates_x (np.ndarray)

  • prediction (SurrogatePrediction | None)

  • archive (Archive)

  • ctx (OptimizationState | None)

  • prepared (Any)

Return type:

AcquisitionResult

SMSEGOAcquisition.prepare(archive, ctx=None)#

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

Parameters:
  • archive (Archive)

  • ctx (OptimizationState | None)

Return type:

Any

SMSEGOAcquisition.score(prediction, reference, rng=None)[source]#

Compute hypervolume improvement of the LCB-predicted candidates.

Parameters:
  • prediction (SurrogatePrediction) – Surrogate predictions. Must have std (has_uncertainty == True).

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

  • rng (Generator | None)

Returns:

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

Return type:

np.ndarray

Raises:

TypeError – If prediction does not contain uncertainty estimates.