smt_optim.acquisition_strategies
Acquisition Strategies#
- class MFSEGO(state: State, **kwargs)[source]#
Bases:
AcquisitionStrategyMulti-Fidelity Super Efficient Global Optimization (MF-SEGO) strategy.
This acquisition strategy can perform Efficient Global Optimization (EGO) (unconstrained optimization), SEGO (constrained optimization), and MF-SEGO (multi-fidelity unconstrained or constrained optimization).
It is compatible with various acquisition functions, including: - expected improvement, - log expected improvement, - probability of improvement, and - log probability of improvement.
The constraints are handled by maximizing the acquisition function with respect to predictions from constraint surrogate models, instead of using the Probability-of-Improvement approach.
In the multi-fidelity setting, the acquisition function is first maximized, followed by fidelity level selection. This strategy maintains a nested Design of Experiments (DoE), meaning that for each new fidelity level sampled, all lower-fidelity levels are also requested to be sampled.
MF-SEGO offers different fidelity selection criteria: - obj-only, - optimistic, - pessimistic, and - average.
- Parameters:
state (State) – Optimization state containing surrogate models, data, and problem definition.
acq_func (callable, optional) – Acquisition function used to rank candidate points (default: log_ei).
n_start (int, optional) – Number of multistart initializations for the inner optimizer. Default: 20.
fidelity_crit ({"obj-only", "average", "optimistic", "pessimistic"}, optional) – Strategy used to select fidelity level.
select_fidelity (bool, optional) – If False, always evaluate all fidelity levels.
sp_method (str, optional) – Optimization method passed to SciPy (e.g., “SLSQP”, “COBYLA”). Default = “SLSQP”.
sp_tol (float, optional) – Tolerance for the SciPy optimizer. Default = sqrt(machine epsilon).
Notes
When optimizing a high-dimensional problem, it is recommended to increase the number of starting points (n_start). The default setting may be insufficient for problems with higher dimensions or many constraints.
This acquisition strategy is designed to work with SMT’s surrogate models. In the multi-fidelity setting, SMT’s MFK model must be used.
- compute_all_s2_red_norm(x_pred: ndarray, costs: list[float], surrogates: list) list[ndarray][source]#
- get_fidelity(next_x: ndarray, state: State) list[int][source]#
Select the highest fidelity level to sample at the given point(s).
- Parameters:
next_x (np.ndarray) – The point(s) to sample at.
state (State) – The current optimization state.
- Returns:
levels – The selected fidelity level(s). If state.problem.num_fidelity is 1, returns the single fidelity level; otherwise, returns a list of fidelity levels, one for each point in next_x.
- Return type:
list[int] or array of int
Notes
This method takes into account the problem’s cost model and the available surrogate models.
- get_infill(acq_context: State) list[ndarray][source]#
Compute the next infill point(s) using the acquisition strategy.
- Parameters:
acq_context (State) – Current optimization state, including surrogate models and data.
- Returns:
List of selected infill points. Each entry corresponds to a point (and potentially a fidelity level, depending on configuration).
- Return type:
list of ndarray
Notes
This method: - Optimizes the acquisition function using a multistart strategy - Applies the selected fidelity criterion if select_fidelity=True - Uses SciPy optimizers (controlled via sp_method, sp_tol)
- class VFPI(state: State, **kwargs)[source]#
Bases:
AcquisitionStrategy- epi(x: ndarray, lvl: int, state: State) float[source]#
Evaluate the Extended Probability of Improvement (EPI) acquisition function.
This method computes an acquisition value that combines the probability of improvement at the highest fidelity with several multiplicative correction factors accounting for fidelity correlation, evaluation cost, sampling density, and probability of feasibility (for constrained optimization).
- Parameters:
x (ndarray of shape (1, n_dim)) – Input point at which the acquisition function is evaluated.
lvl (int) – Fidelity level at which the acquisition function is computed. Lower values correspond to lower-fidelity (cheaper) models, starting from 0.
state (State) – Optimization state
- Returns:
Value of the EPI acquisition function at the given point and fidelity level.
- Return type:
float
Notes
The EPI criterion is defined as a product of the following terms:
Probability of Improvement (PI): Computed at the highest fidelity level using the predictive mean and variance.
Fidelity Correlation Penalty: Accounts for the correlation between the selected fidelity level and the highest fidelity.
Cost Ratio: Ratio of highest-fidelity cost to the cost at the selected level.
Density Penalty: Optional factor that penalizes regions with high sampling density.
Probability of Feasibility (PoF): Product of feasibility probabilities across all constraints, evaluated at the selected fidelity level.
The input
xis reshaped internally to match the expected input format of the surrogate models.See also
probability_of_improvementComputes the probability of improvement.
fidelity_correlationComputes correlation between fidelity levels.
sample_densityEstimates local sampling density (if enabled).
- get_predicted_fmin(state)[source]#
Estimate the minimum predicted objective value using multistart optimization.
This method constructs a wrapper around the first surrogate objective model stored in
state.obj_modelsand performs a multistart optimization over the unit hypercube \([0, 1]^d\), where \(d\) is the problem dimension. The optimization is carried out using themultistart_minimizeroutine.- Parameters:
state (State) – Optimization state
- Returns:
The minimum predicted objective function value found across all multistart runs.
- Return type:
float
Notes
The search domain is assumed to be the unit hypercube.
The optimization relies on
self.n_startinitial points andself.seedfor reproducibility.
See also
multistart_minimizeMultistart optimization routine used to perform the search.
- sample_density(x: ndarray, lvl: int, mfck) ndarray[source]#
Compute a sampling density penalty based on correlation structure.
This method evaluates a multiplicative penalty that reflects the local sampling density at a given point
xfor a specified fidelity level. The penalty is derived from the correlation kernel of a multi-fidelity co-Kriging (MFCK) model and decreases in regions where training samples are dense.- Parameters:
x (ndarray of shape (n_dim,) or (n_eval, n_dim)) – Input point(s) at which the density penalty is evaluated.
lvl (int) – Fidelity level at which the density is computed.
mfck (MFCK) – Multi-fidelity co-Kriging model from the SMT package.
- Returns:
Density penalty values at the input locations. Lower values indicate regions with higher sampling density.
- Return type:
ndarray of shape (n_eval, 1)
Notes
Inputs are internally normalized using the model’s scaling and offset.
The kernel hyperparameters (
sigma2andtheta) are extracted fromoptimal_thetabased on the fidelity level.This formulation encourages exploration by penalizing regions that are strongly correlated with existing samples.