saealib.SurrogateManager

class saealib.SurrogateManager[source]

Bases: ABC

Abstract base class for surrogate managers.

A SurrogateManager coordinates the fit/predict/score pipeline and returns both scalar acquisition scores and the underlying predictions so that callers (e.g. IndividualBasedStrategy) can assign predicted objective values to offspring.

Methods

__init__

score_candidates

Score candidate solutions using the surrogate model.

Method Details

SurrogateManager.__init__()
abstract SurrogateManager.score_candidates(candidates_x, archive, provider=None, ctx=None)[source]

Score candidate solutions using the surrogate model.

Parameters:
  • candidates_x (np.ndarray) – Candidate design variable matrix. shape: (n_candidates, dim)

  • archive (Archive) – Archive of evaluated solutions used for surrogate training.

  • provider (ComponentProvider or None, optional) – Component provider used to dispatch PostSurrogateFitEvent after each surrogate fit. If None, no event is dispatched.

  • ctx (OptimizationContext or None, optional) – Current optimization context. Required when provider is given.

Returns:

  • scores (np.ndarray) – Acquisition scores. shape: (n_candidates,). Higher is better.

  • predictions (list[SurrogatePrediction]) – Surrogate predictions for each candidate. predictions[i].mean shape: (1, n_obj)

Return type:

tuple[np.ndarray, list[SurrogatePrediction]]