saealib.SurrogateManager¶
- class saealib.SurrogateManager[source]¶
Bases:
ABCAbstract 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
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
PostSurrogateFitEventafter each surrogate fit. IfNone, no event is dispatched.ctx (OptimizationContext or None, optional) – Current optimization context. Required when
provideris given.
- Returns:
scores (np.ndarray) – Acquisition scores. shape: (n_candidates,). Higher is better.
predictions (list[SurrogatePrediction]) – Surrogate predictions for each candidate. predictions[i].value shape: (1, n_obj)
- Return type:
tuple[np.ndarray, list[SurrogatePrediction]]