smt_optim.acquisition_functions

Acquisition Functions#

expected_improvement(mu: float, s2: float, f_min: float) float[source]#

Expected Improvement acquisition function.

Parameters:
  • mu (float) – Mean prediction.

  • s2 (float) – Variance prediction.

  • f_min (float) – Best minimum objective value in training data.

Returns:

Expected Improvement value.

Return type:

float

fidelity_correlation(covariance: ndarray, li_var: ndarray, lj_var: ndarray) ndarray[source]#

Compute the posterior correlation between two fidelity levels.

This function evaluates the pointwise Pearson correlation coefficient between the predictive distributions of two fidelity levels based on their posterior covariance and variances. The resulting correlation is clipped to the interval [0, 1].

Parameters:
  • covariance (ndarray of shape (n_eval,)) – Posterior covariance between the predictions at fidelity levels \(i\) and \(j\) for each evaluation point.

  • li_var (ndarray of shape (n_eval,)) – Posterior predictive variance at fidelity level \(i\).

  • lj_var (ndarray of shape (n_eval,)) – Posterior predictive variance at fidelity level \(j\).

Returns:

Absolute value of the correlation coefficient between fidelity levels \(i\) and \(j\), clipped to the interval [0, 1].

Return type:

ndarray of shape (n_eval,)

log_ei(mu: float, s2: float, f_min: float) float[source]#

Log Expected Improvement acquisition function.

LogEI is more numerically stable that the EI acquisition function especially when the GP’s variance is small. From: https://arxiv.org/abs/2310.20708.

Parameters:
  • mu (float) – Mean prediction

  • s2 (float) – Variance prediction

  • f_min (float) – Best minimum objective value in training data.

Return type:

float

log_pi(mu: float, s2: float, f_min: float) float[source]#

Log Probability of Improvement acquisition function.

LogPI is more numerically stable that the pi acquisition function especially when the GP’s variance is small. From: https://arxiv.org/abs/2310.20708.

Parameters:
  • mu (float) – Mean prediction

  • s2 (float) – Variance prediction

  • f_min (float) – Best minimum objective value in training data.

Return type:

float

probability_of_improvement(mu: float, s2: float, f_min: float) float[source]#

Probability of Improvement (PI) acquisition function.

Parameters:
  • mu (float) – Mean prediction.

  • s2 (float) – Variance prediction.

  • f_min (float) – Best minimum objective value in training data.

Returns:

Probability of Improvement value.

Return type:

float

vec_expected_improvement(mu: ndarray, s2: ndarray, f_min: float) ndarray[source]#

Vectorized Expected Improvement acquisition function.

Parameters:
  • mu (np.ndarray) – Mean prediction of shape (num_points, 1).

  • s2 (np.ndarray) – Variance prediction of shape (num_points, 1).

  • f_min (float) – Best minimum objective value in training data.

Returns:

Expected Improvement values of shape (num_points, 1).

Return type:

np.ndarray

vec_probability_of_improvement(mu: ndarray, s2: ndarray, f_min: float) ndarray[source]#

Probability of Improvement (PI) acquisition function.

Parameters:
  • mu (float) – Mean prediction.

  • s2 (float) – Variance prediction.

  • f_min (float) – Best minimum objective value in training data.

Returns:

Probability of Improvement value.

Return type:

float