Acquisition Functions

Base Class

class autooed.mobo.acquisition.base.Acquisition(surrogate_model, **kwargs)[source]

Bases: abc.ABC

Base class of acquisition function.

__init__(surrogate_model, **kwargs)[source]

Initialize the acquisition function.

Parameters:surrogate_model (autooed.mobo.surrogate_model.base.SurrogateModel) – The surrogate model.
abstract _evaluate(X, gradient, hessian)[source]

Evaluate the acquisition values of the normalized and continuous design variables.

Parameters:
  • X (np.array) – Input design variables (continuous).
  • gradient (bool) – Whether to calculate the gradient of the prediction.
  • hessian (bool) – Whether to calculate the hessian of the prediction.
Returns:

  • F (np.array) – Acquisition value, shape (N, n_obj).
  • dF (np.array) – Gradient of F, shape (N, n_obj, n_var).
  • hF (np.array) – Hessian of F, shape (N, n_obj, n_var, n_var).

abstract _fit(X, Y)[source]

Fit the parameters of acquisition function from normalized and continuous data.

Parameters:
  • X (np.array) – Input design variables (continuous).
  • Y (np.array) – Input performance values.
evaluate(X, dtype='raw', gradient=False, hessian=False)[source]

Evaluate the acquisition values of the design variables.

Parameters:
  • X (np.array) – Input design variables.
  • gradient (bool) – Whether to calculate the gradient of the prediction.
  • hessian (bool) – Whether to calculate the hessian of the prediction.
Returns:

  • F (np.array) – Acquisition value, shape (N, n_obj).
  • dF (np.array) – Gradient of F, shape (N, n_obj, n_var).
  • hF (np.array) – Hessian of F, shape (N, n_obj, n_var, n_var).

fit(X, Y, dtype='raw')[source]

Fit the parameters of acquisition function from raw data.

Parameters:
  • X (np.array) – Input design variables (raw).
  • Y (np.array) – Input performance values.

Expected Improvement

class autooed.mobo.acquisition.ei.ExpectedImprovement(surrogate_model, **kwargs)[source]

Bases: autooed.mobo.acquisition.base.Acquisition

Expected Improvement.

__init__(surrogate_model, **kwargs)[source]

Initialize the acquisition function.

Parameters:surrogate_model (autooed.mobo.surrogate_model.base.SurrogateModel) – The surrogate model.
_evaluate(X, gradient, hessian)[source]

Evaluate the acquisition values of the normalized and continuous design variables.

Parameters:
  • X (np.array) – Input design variables (continuous).
  • gradient (bool) – Whether to calculate the gradient of the prediction.
  • hessian (bool) – Whether to calculate the hessian of the prediction.
Returns:

  • F (np.array) – Acquisition value, shape (N, n_obj).
  • dF (np.array) – Gradient of F, shape (N, n_obj, n_var).
  • hF (np.array) – Hessian of F, shape (N, n_obj, n_var, n_var).

_fit(X, Y)[source]

Fit the parameters of acquisition function from normalized and continuous data.

Parameters:
  • X (np.array) – Input design variables (continuous).
  • Y (np.array) – Input performance values.

Identity Function

class autooed.mobo.acquisition.identity.Identity(surrogate_model, **kwargs)[source]

Bases: autooed.mobo.acquisition.base.Acquisition

Identity function.

_evaluate(X, gradient, hessian)[source]

Evaluate the acquisition values of the normalized and continuous design variables.

Parameters:
  • X (np.array) – Input design variables (continuous).
  • gradient (bool) – Whether to calculate the gradient of the prediction.
  • hessian (bool) – Whether to calculate the hessian of the prediction.
Returns:

  • F (np.array) – Acquisition value, shape (N, n_obj).
  • dF (np.array) – Gradient of F, shape (N, n_obj, n_var).
  • hF (np.array) – Hessian of F, shape (N, n_obj, n_var, n_var).

_fit(X, Y)[source]

Fit the parameters of acquisition function from normalized and continuous data.

Parameters:
  • X (np.array) – Input design variables (continuous).
  • Y (np.array) – Input performance values.

Probability of Improvement

class autooed.mobo.acquisition.pi.ProbabilityOfImprovement(surrogate_model, **kwargs)[source]

Bases: autooed.mobo.acquisition.base.Acquisition

Probability of Improvement.

__init__(surrogate_model, **kwargs)[source]

Initialize the acquisition function.

Parameters:surrogate_model (autooed.mobo.surrogate_model.base.SurrogateModel) – The surrogate model.
_evaluate(X, gradient, hessian)[source]

Evaluate the acquisition values of the normalized and continuous design variables.

Parameters:
  • X (np.array) – Input design variables (continuous).
  • gradient (bool) – Whether to calculate the gradient of the prediction.
  • hessian (bool) – Whether to calculate the hessian of the prediction.
Returns:

  • F (np.array) – Acquisition value, shape (N, n_obj).
  • dF (np.array) – Gradient of F, shape (N, n_obj, n_var).
  • hF (np.array) – Hessian of F, shape (N, n_obj, n_var, n_var).

_fit(X, Y)[source]

Fit the parameters of acquisition function from normalized and continuous data.

Parameters:
  • X (np.array) – Input design variables (continuous).
  • Y (np.array) – Input performance values.

Thompson Sampling

class autooed.mobo.acquisition.ts.ThompsonSampling(surrogate_model, n_spectral_pts=100, mean_sample=False, **kwargs)[source]

Bases: autooed.mobo.acquisition.base.Acquisition

Thompson Sampling.

__init__(surrogate_model, n_spectral_pts=100, mean_sample=False, **kwargs)[source]

Initialize the acquisition function.

Parameters:surrogate_model (autooed.mobo.surrogate_model.base.SurrogateModel) – The surrogate model.
_evaluate(X, gradient=False, hessian=False)[source]

Evaluate the acquisition values of the normalized and continuous design variables.

Parameters:
  • X (np.array) – Input design variables (continuous).
  • gradient (bool) – Whether to calculate the gradient of the prediction.
  • hessian (bool) – Whether to calculate the hessian of the prediction.
Returns:

  • F (np.array) – Acquisition value, shape (N, n_obj).
  • dF (np.array) – Gradient of F, shape (N, n_obj, n_var).
  • hF (np.array) – Hessian of F, shape (N, n_obj, n_var, n_var).

_fit(X, Y)[source]

Fit the parameters of acquisition function from normalized and continuous data.

Parameters:
  • X (np.array) – Input design variables (continuous).
  • Y (np.array) – Input performance values.

Upper Confidence Bound

class autooed.mobo.acquisition.ucb.UpperConfidenceBound(surrogate_model, **kwargs)[source]

Bases: autooed.mobo.acquisition.base.Acquisition

Upper Confidence Bound.

__init__(surrogate_model, **kwargs)[source]

Initialize the acquisition function.

Parameters:surrogate_model (autooed.mobo.surrogate_model.base.SurrogateModel) – The surrogate model.
_evaluate(X, gradient, hessian)[source]

Evaluate the acquisition values of the normalized and continuous design variables.

Parameters:
  • X (np.array) – Input design variables (continuous).
  • gradient (bool) – Whether to calculate the gradient of the prediction.
  • hessian (bool) – Whether to calculate the hessian of the prediction.
Returns:

  • F (np.array) – Acquisition value, shape (N, n_obj).
  • dF (np.array) – Gradient of F, shape (N, n_obj, n_var).
  • hF (np.array) – Hessian of F, shape (N, n_obj, n_var, n_var).

_fit(X, Y)[source]

Fit the parameters of acquisition function from normalized and continuous data.

Parameters:
  • X (np.array) – Input design variables (continuous).
  • Y (np.array) – Input performance values.