Egor (EGObox)
Egor is a gradient-free global optimizer from the EGObox library. As a bayesian optimizer, it is used to optimize expensive-to-evaluate black-box functions.
The modOpt Egor wrapper supports continuous design variables with finite bounds and
nonlinear constraints with all standard bound forms:
upper-bounded constraints
c(x) <= ulower-bounded constraints
c(x) >= lequality constraints
c(x) = vdouble-sided constraints
l <= c(x) <= u
Warning
Egor in modOpt currently requires finite lower and upper bounds on every design variable. Problems with unbounded variables are rejected.
Before using Egor, install egobox:
pip install egobox
or install via modOpt extras:
pip install "modopt[egobox]"
To use the Egor solver in modOpt, import it as:
from modopt import Egor
Then instantiate it with optional solver_options:
optimizer = Egor(prob, solver_options={"max_iters": 50, "n_doe": 10, "seed": 42})
modOpt forwards Egor options through two paths:
constructor options are passed to
egobox.Egor(...)runtime options are passed to
Egor.minimize(...)
Note
For constrained problems, do not pass solver_options['cstr_specs'] directly.
The modOpt wrapper builds cstr_specs automatically from cl and cu.
Option |
Type (default value) |
Description |
|---|---|---|
|
int ( |
Maximum number of Egor iterations. Passed to |
|
egobox.GpConfig |
GP configuration used by the optimizer, see |
|
int ( |
Number of runs of infill strategy optimizations; |
|
int ( |
Number of samples of initial LHS sampling, used |
|
None, list, tuple, or ndarray ( |
Initial DOE containing |
|
egobox.InfillStrategy ( |
Infill criterion used to decide the next |
|
bool ( |
Activates the constrained infill criterion, |
|
egobox.ConstraintStrategy ( |
Constraint management strategy for infill; use |
|
egobox.QEiConfig |
Configuration for parallel qEI, also known as |
|
egobox.InfillOptimizer ( |
Internal optimizer used to optimize the infill |
|
object ( |
TREGO configuration to activate TREGO strategy |
|
int ( |
Number of cooperative component groups used by |
|
float ( |
Known optimum used as a stopping criterion. |
|
egobox.FailsafeStrategy ( |
Strategy to handle objective computation failure. |
|
int or |
Random generator seed to allow computation |
|
str or |
Directory to write optimization history and use |
|
bool ( |
Start by loading initial DOE from |
|
int or |
When |
|
object or |
Optional run information object used for |
|
float, int, or |
Optional timeout in seconds. The optimization |
|
int, egobox.Verbosity, or |
Logging verbosity level. Default is |
|
None, list, tuple, or ndarray ( |
List of tolerances for constraints to be |
|
None, list, or tuple ( |
Optional list of |
|
list or tuple ( |
List of constraints defined as functions. |
|
list or tuple ( |
Optional list of |
Note
Detailed information on egobox objects can be retrieved using the python interpreter. See example below.
> python
>>> help(egobox.GpConfig)