Acquisition Functions

Base Class

class algorithm.mobo.acquisition.base.Acquisition(*args, **kwargs)[source]

Bases: abc.ABC

Base class of acquisition function.

requires_std

Whether requires std output from surrogate model, set False to avoid unnecessary computation.

Type

bool, default=False

__init__(*args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

abstract evaluate(val, calc_gradient=False, calc_hessian=False)[source]

Evaluate the output from surrogate model using acquisition function.

Parameters
  • val (dict) –

    Output from surrogate model storing properties of the predicted performance.

    • val[‘F’]: mean, shape (N, n_obj)

    • val[‘dF’]: gradient of mean, shape (N, n_obj, n_var)

    • val[‘hF’]: hessian of mean, shape (N, n_obj, n_var, n_var)

    • val[‘S’]: std, shape (N, n_obj)

    • val[‘dS’]: gradient of std, shape (N, n_obj, n_var)

    • val[‘hS’]: hessian of std, shape (N, n_obj, n_var, n_var)

  • calc_gradient (bool, default=False) – Whether to calculate the gradient of the prediction.

  • calc_hessian (bool, default=False) – 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 data.

Parameters
  • X (np.array) – Input design variables.

  • Y (np.array) – Input performance values.

Identity Function

class algorithm.mobo.acquisition.identity.IdentityFunc(*args, **kwargs)[source]

Bases: algorithm.mobo.acquisition.base.Acquisition

Identity function.

requires_std

Whether requires std output from surrogate model.

Type

bool, default=False

evaluate(val, calc_gradient=False, calc_hessian=False)[source]

Evaluate the output from surrogate model using acquisition function.

Parameters
  • val (dict) –

    Output from surrogate model storing properties of the predicted performance.

    • val[‘F’]: mean, shape (N, n_obj)

    • val[‘dF’]: gradient of mean, shape (N, n_obj, n_var)

    • val[‘hF’]: hessian of mean, shape (N, n_obj, n_var, n_var)

    • val[‘S’]: std, shape (N, n_obj)

    • val[‘dS’]: gradient of std, shape (N, n_obj, n_var)

    • val[‘hS’]: hessian of std, shape (N, n_obj, n_var, n_var)

  • calc_gradient (bool, default=False) – Whether to calculate the gradient of the prediction.

  • calc_hessian (bool, default=False) – 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).

Probability of Improvement

class algorithm.mobo.acquisition.pi.PI(*args, **kwargs)[source]

Bases: algorithm.mobo.acquisition.base.Acquisition

Probability of Improvement.

requires_std

Whether requires std output from surrogate model.

Type

bool, default=True

__init__(*args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

evaluate(val, calc_gradient=False, calc_hessian=False)[source]

Evaluate the output from surrogate model using acquisition function.

Parameters
  • val (dict) –

    Output from surrogate model storing properties of the predicted performance.

    • val[‘F’]: mean, shape (N, n_obj)

    • val[‘dF’]: gradient of mean, shape (N, n_obj, n_var)

    • val[‘hF’]: hessian of mean, shape (N, n_obj, n_var, n_var)

    • val[‘S’]: std, shape (N, n_obj)

    • val[‘dS’]: gradient of std, shape (N, n_obj, n_var)

    • val[‘hS’]: hessian of std, shape (N, n_obj, n_var, n_var)

  • calc_gradient (bool, default=False) – Whether to calculate the gradient of the prediction.

  • calc_hessian (bool, default=False) – 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 data.

Parameters
  • X (np.array) – Input design variables.

  • Y (np.array) – Input performance values.

Expected Improvement

class algorithm.mobo.acquisition.ei.EI(*args, **kwargs)[source]

Bases: algorithm.mobo.acquisition.base.Acquisition

Expected Improvement.

requires_std

Whether requires std output from surrogate model.

Type

bool, default=True

__init__(*args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

evaluate(val, calc_gradient=False, calc_hessian=False)[source]

Evaluate the output from surrogate model using acquisition function.

Parameters
  • val (dict) –

    Output from surrogate model storing properties of the predicted performance.

    • val[‘F’]: mean, shape (N, n_obj)

    • val[‘dF’]: gradient of mean, shape (N, n_obj, n_var)

    • val[‘hF’]: hessian of mean, shape (N, n_obj, n_var, n_var)

    • val[‘S’]: std, shape (N, n_obj)

    • val[‘dS’]: gradient of std, shape (N, n_obj, n_var)

    • val[‘hS’]: hessian of std, shape (N, n_obj, n_var, n_var)

  • calc_gradient (bool, default=False) – Whether to calculate the gradient of the prediction.

  • calc_hessian (bool, default=False) – 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 data.

Parameters
  • X (np.array) – Input design variables.

  • Y (np.array) – Input performance values.

Upper Confidence Bound

class algorithm.mobo.acquisition.ucb.UCB(*args, **kwargs)[source]

Bases: algorithm.mobo.acquisition.base.Acquisition

Upper Confidence Bound.

requires_std

Whether requires std output from surrogate model.

Type

bool, default=True

__init__(*args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

evaluate(val, calc_gradient=False, calc_hessian=False)[source]

Evaluate the output from surrogate model using acquisition function.

Parameters
  • val (dict) –

    Output from surrogate model storing properties of the predicted performance.

    • val[‘F’]: mean, shape (N, n_obj)

    • val[‘dF’]: gradient of mean, shape (N, n_obj, n_var)

    • val[‘hF’]: hessian of mean, shape (N, n_obj, n_var, n_var)

    • val[‘S’]: std, shape (N, n_obj)

    • val[‘dS’]: gradient of std, shape (N, n_obj, n_var)

    • val[‘hS’]: hessian of std, shape (N, n_obj, n_var, n_var)

  • calc_gradient (bool, default=False) – Whether to calculate the gradient of the prediction.

  • calc_hessian (bool, default=False) – 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 data.

Parameters
  • X (np.array) – Input design variables.

  • Y (np.array) – Input performance values.