Surrogate Models#

Layer 2: Compose

Base#

saealib.Surrogate

Base class for surrogate models.

saealib.RegressionSurrogate

Marker base class for absolute-fitness (regression) surrogates.

saealib.ComparisonSurrogate

Base class for relative-fitness (comparison) surrogates.

saealib.SurrogatePrediction

Unified return type for surrogate model predictions.

Surrogate Managers#

saealib.SurrogateManager

Abstract base class for surrogate managers.

saealib.GlobalSurrogateManager

Surrogate manager that fits once on the full archive.

saealib.LocalSurrogateManager

Surrogate manager that fits a local model per candidate (pre-selection).

saealib.CompositeSurrogateManager

Surrogate manager that composes predictions from multiple named sub-managers.

saealib.PairwiseSurrogateManager

Surrogate manager for pairwise comparison surrogates.

saealib.product_combine

Combine scores by element-wise product.

saealib.rank_weighted_combine

Return a combine function that rank-normalises then takes a weighted average.

RBF Surrogate#

saealib.RBFSurrogate

Radial Basis Function interpolation surrogate model.

RBF Kernels#

saealib.RBFKernel

Abstract base for RBF kernel implementations.

saealib.GaussianKernel

Gaussian radial basis function kernel.

saealib.ThinPlateSplineKernel

Thin-plate spline radial basis function kernel.

saealib.LinearKernel

Linear radial basis function kernel.

saealib.CubicKernel

Cubic radial basis function kernel.

saealib.MultiquadricKernel

Multiquadric radial basis function kernel.

saealib.MaternKernel

Matérn radial basis function kernel.

Scikit-learn / External Library Adapters#

saealib.SklearnSurrogate

Surrogate adapter for scikit-learn compatible estimators.

saealib.SklearnGPRSurrogate

Gaussian Process Regressor surrogate.

saealib.SklearnRFRSurrogate

Random Forest Regressor surrogate.

saealib.SklearnSVMSurrogate

Support Vector Regression surrogate.

saealib.SklearnNNSurrogate

Multi-layer Perceptron surrogate.

saealib.SklearnXGBSurrogate

XGBoost surrogate.

saealib.SklearnLGBMSurrogate

LightGBM surrogate.

saealib.SklearnClassificationSurrogate

Surrogate adapter for scikit-learn compatible binary classifiers.

saealib.SklearnRFCClassificationSurrogate

Random Forest Classification surrogate.

saealib.SklearnSVCClassificationSurrogate

Support Vector Classification surrogate.

saealib.TorchSurrogate

Surrogate adapter for PyTorch nn.Module models.

Per-Objective Surrogate#

saealib.PerObjectiveSurrogate

Assigns a different surrogate model to each objective function.

Training Sets#

saealib.TrainingData

Immutable container for the training data passed to Surrogate.fit.

saealib.TrainingSet

Strategy object that builds (train_x, train_y) for a surrogate.

saealib.ArchiveObjectiveSet

Use the entire archive as training data with raw objective values.

saealib.ConstraintObjectiveSet

Use the entire archive as training data with raw constraint values.

saealib.FeasibilityClassificationSet

Binary labels derived from constraint violation: 1 if feasible, 0 otherwise.

saealib.KNNObjectiveSet

Retrieve the k nearest archive neighbours of candidate_x.

saealib.KNNConstraintObjectiveSet

Retrieve the k nearest archive neighbours of candidate_x.

saealib.LevelBasedSet

Multi-class labels from equal-division of a sorted population (CA-LLSO, P1).

saealib.PairwiseComparisonSet

Pairwise labels: train_x is [x_a, x_b], label is 1 if a beats b.

saealib.ReferencePointComparisonSet

Binary labels: 1 if archive point dominates the reference point, 0 otherwise.

saealib.TopKBipartitionSet

Binary labels from a sorted bipartition: 1 for top-k, 0 for the rest.

Surrogate Switching#

saealib.AccuracyBasedSurrogateSwitcher

Abstract base for accuracy-driven module and parameter switching.

saealib.GenCtrlSwitcher

Adjust gen_ctrl via exponential smoothing (Repický et al., 2017).

saealib.ManagerSwitcher

Switch between two surrogate managers based on an accuracy threshold.

saealib.StrategySwitcher

Switch between optimization strategies based on an accuracy threshold.

Accuracy Evaluation#

saealib.AccuracyEvaluator

Abstract base for surrogate accuracy evaluators.

saealib.HeldOutAccuracyEvaluator

Evaluates accuracy against pre-specified held-out data.

saealib.KFoldAccuracyEvaluator

Evaluates surrogate accuracy via k-fold cross-validation.

saealib.LOOAccuracyEvaluator

Evaluates surrogate accuracy via leave-one-out cross-validation.

saealib.SurrogateAccuracy

Container for surrogate accuracy metrics computed after a fit.

saealib.SurrogateAccuracyMetric

Abstract base for a scalar accuracy metric.

saealib.RMSE

Root mean squared error.

saealib.R2Score

Coefficient of determination (R²).

saealib.SpearmanCorrelation

Spearman rank correlation averaged over objectives.