Egor

Egor is the surrogate-based Efficient Global Optimization (EGO) optimizer from the open-source EGObox library.

Egor uses bayesian optimization techniques well-suited to find the global optimum of an expansive-to-evaluate black-box function. Basically, it uses a surrogate model to approximate the objective function and an infill criterion (aka acquisition function) to guide the search for the optimum.

The pyOptSparse wrapper is derivative-free and targets single-objective, bounded, continuous design spaces. Constraint values are passed to Egor with the pyOptSparse constraint convention transformed to \(c(x) \le 0\).

Installation

Egor is made available through the egobox Python package.

$ pip install egobox

egobox is also available via conda-forge:

$ conda install -c conda-forge egobox

Options

Please refer to the Egor help for a complete listing of options and their default values.

$ python
>>> import egobox as egx
>>> help(egx.Egor)
>>> help(egx.GpConfig)

pyoptSparse expects pickable objects while native Egor structures as GpConfig are not pickable. To workaround this constraint, the pyOptSparse Egor wrapper uses dictionaries which are accepted by Egor to update the default field values of Egor structures. Names and default values of the fields are provided in the descriptions below.

Egor Default Options

Name

Type

Default value

Description

gp_config

dict

{}

GpConfig as a dict used by Egor for surrogate model configuration. Main defaults are:

  • regr_spec: 1 (Constant)

  • corr_spec: 2 (Squared Exponential)

  • kpls_dim: no PLS dimensionality reduction (otherwise int)

  • n_clusters: no clustering (otherwise int)

cstr_tol

list

[]

Constraint tolerances list passed to Egor (size n_cstr plus n_fcstr) Default is 1e-4 for all constraints.

n_start

int

20

Number of infill optimization runs (best run selected)

n_doe

int

0

Number of initial DOE samples (0 lets Egor choose automatically)

doe

list

[[]]

Initial DOE array, either x-only or concatenated x and y to be passed as list of lists of floats. If not provided, Egor will generate a DOE automatically.

infill_strategy

int

4

cstr_infill

bool

False

Enable constrained infill criterion (aka CEI)

cstr_strategy

int

1

Constraint strategy enum for surrogate constraint handling:

  • 1 = MeanConstraint (default)

  • 2 = UpperConfidenceBound

qei_config

dict

{}

QEiConfig for batch (qEI) point selection passed as a dict with main keys being:

  • batch: size of batch (int)

  • strategy: qEI strategy enum

infill_optimizer

int

1

Internal infill optimizer:

  • 1 = COBYLA (default)

  • 2 = SLSQP

trego

dict

{}

Enable TREGO (aka Trust Region EGO) algorithm configured with main parameters:

  • n_gl_steps: (nb of global search steps default 1, nb of local search steps default 4)

  • beta: trust region factor (default 0.9)

coego_n_coop

int

0

Number of cooperative groups for CoEGO algorithm

target

float

-1000000000000.0

Known objective target used as stopping criterion

outdir

str

Output directory for Egor output files (configuration, does, history and warm start search)

warm_start

bool

False

Load initial DOE from outdir when enabled

hot_start

bool

False

Egor checkpoint restart parameter to be used in case of fallible environment to continue with the same Egor parameterization till max iterations or timeout is reached.

failsafe_strategy

int

1

Failure handling enum

  • 1 = REJECTION (default),

  • 2 = IMPUTATION,

  • 3 = PROBA OF VIABILITY

seed

int

-1

Seed for random number generator (default -1 for random seed)

verbose

int

0

Verbosity level for Egor logging

  • 0 = error (default)

  • 1 = warning

  • 2 = info

  • 3 = debug

max_iters

int

20

Egor iteration budget

run_info

dict

{}

Optional RunInfo used to pass additional information to Egor (e.g., for logging)

timeout

float

-1.0

Optional timeout in seconds used as sttopping criterion for Egor minimize

fcstrs

list

[]

Optional list of native Egobox function constraints passed directly as fcstrs (instead of pyOptSparse constraints which are metamodelized)

fcstr_specs

list

[]

Optional list of egobox.CstrSpec for function constraints passed as fcstrs