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.
Name |
Type |
Default value |
Description |
|---|---|---|---|
|
dict |
{} |
GpConfig as a dict used by Egor for surrogate model configuration. Main defaults are:
|
|
list |
[] |
Constraint tolerances list passed to Egor (size n_cstr plus n_fcstr)
Default is |
|
int |
20 |
Number of infill optimization runs (best run selected) |
|
int |
0 |
Number of initial DOE samples (0 lets Egor choose automatically) |
|
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. |
|
int |
4 |
|
|
bool |
False |
Enable constrained infill criterion (aka CEI) |
|
int |
1 |
Constraint strategy enum for surrogate constraint handling:
|
|
dict |
{} |
QEiConfig for batch (qEI) point selection passed as a dict with main keys being:
|
|
int |
1 |
Internal infill optimizer:
|
|
dict |
{} |
Enable TREGO (aka Trust Region EGO) algorithm configured with main parameters:
|
|
int |
0 |
Number of cooperative groups for CoEGO algorithm |
|
float |
-1000000000000.0 |
Known objective target used as stopping criterion |
|
str |
Output directory for Egor output files (configuration, does, history and warm start search) |
|
|
bool |
False |
Load initial DOE from outdir when enabled |
|
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. |
|
int |
1 |
Failure handling enum
|
|
int |
-1 |
Seed for random number generator (default -1 for random seed) |
|
int |
0 |
Verbosity level for Egor logging
|
|
int |
20 |
Egor iteration budget |
|
dict |
{} |
Optional RunInfo used to pass additional information to Egor (e.g., for logging) |
|
float |
-1.0 |
Optional timeout in seconds used as sttopping criterion for Egor minimize |
|
list |
[] |
Optional list of native Egobox function constraints passed directly as fcstrs (instead of pyOptSparse constraints which are metamodelized) |
|
list |
[] |
Optional list of egobox.CstrSpec for function constraints passed as fcstrs |