bounds – List with the limits [x_min,x_max] of each direction x in the search
space.
maxeval (int) – Maximum number of function evaluations.
x0y0 – Initial guess for the solution and the value of the objective function
at the initial guess. (default: ())
surrogateModel – Gaussian Process surrogate model. The default is GaussianProcess().
On exit, if provided, the surrogate model is updated to represent the
one used in the last iteration. (default: None)
acquisitionFunc (Optional[MaximizeEI]) – Acquisition function to be used. (default: None)
batchSize (int) – Number of new sample points to be generated per iteration. The default is 1. (default: 1)
disp (bool) – If True, print information about the optimization process. The default
is False. (default: False)
callback (Optional[Callable[[OptimizeResult], None]]) – If provided, the callback function will be called after each iteration
with the current optimization result. The default is None. (default: None)
this step would use a WeightedAcquisition object with a
NormalSampler sampler. The implementation is configured to
use the acquisition proposed by Müller (2016) by default.
Local step (only when useLocalSearch is True): Runs a local
continuous optimization with the true objective using the best point
found so far as initial guess.
The stopping criteria of steps 1 and 2 is related to the number of
consecutive attempts that fail to improve the best solution by at least
improvementTol. The algorithm alternates between steps 1 and 2 until there
is a sequence (CP,TV,CP) where the individual steps do not meet the
successful improvement tolerance. In that case, the algorithm switches to
step 3. When the local step is finished, the algorithm goes back top step 1.
Parameters:
fun – The objective function to be minimized.
bounds – List with the limits [x_min,x_max] of each direction x in the
search space.
maxeval (int) – Maximum number of function evaluations.
x0y0 – Initial guess for the solution and the value of the objective
function at the initial guess. (default: ())
surrogateModel (Optional[RbfModel]) – Surrogate model to be used. If None is provided, a
RbfModel model with median low-pass filter is used.
On exit, if provided, the surrogate model is updated to represent the
one used in the last iteration. (default: None)
acquisitionFunc (Optional[WeightedAcquisition]) – Acquisition function to be used. If None is
provided, a WeightedAcquisition is used following what is
described by Müller (2016). (default: None)
improvementTol (float) – Expected improvement in the global optimum per
iteration. (default: 0.001)
consecutiveQuickFailuresTol (int) – Number of times that the CP step or the
TV step fails quickly before the
algorithm stops. The default is 0, which means the algorithm will stop
after maxeval function evaluations. A quick failure is when the
acquisition function in the CP or TV step does not find any significant
improvement. (default: 0)
useLocalSearch (bool) – If True, the algorithm will perform a continuous
local search when a significant improvement is not found in a sequence
of (CP,TV,CP) steps. (default: False)
disp (bool) – If True, print information about the optimization process. (default: False)
callback (Optional[Callable[[OptimizeResult], None]]) – If provided, the callback function will be called after
each iteration with the current optimization result. (default: None)
DYCORS algorithm for single-objective optimization
Implementation of the DYCORS (DYnamic COordinate search using Response
Surface models) algorithm proposed in [3]. That is a wrapper to
surrogate_optimization().
Parameters:
fun – The objective function to be minimized.
bounds – List with the limits [x_min,x_max] of each direction x in the
search space.
maxeval (int) – Maximum number of function evaluations.
x0y0 – Initial guess for the solution and the value of the objective
function at the initial guess. (default: ())
surrogateModel – Surrogate model to be used. If None is provided, a
RbfModel model with median low-pass filter is used.
On exit, if provided, the surrogate model is updated to represent the
one used in the last iteration. (default: None)
acquisitionFunc (Optional[WeightedAcquisition]) – Acquisition function to be used. If None is
provided, the acquisition function is the one used in DYCORS-LMSRBF from
Regis and Shoemaker (2012). (default: None)
batchSize (int) – Number of new sample points to be generated per iteration. (default: 1)
disp (bool) – If True, print information about the optimization process. (default: False)
callback (Optional[Callable[[OptimizeResult], None]]) – If provided, the callback function will be called after
each iteration with the current optimization result. (default: None)
Minimize a scalar function of one or more variables subject to
constraints.
The surrogate models are used to approximate the constraints. The objective
function is assumed to be cheap to evaluate, while the constraints are
assumed to be expensive to evaluate.
gfun – The constraint function to be minimized. The constraints must be
formulated as g(x) <= 0.
bounds – List with the limits [x_min,x_max] of each direction x in the search
space.
maxeval (int) – Maximum number of function evaluations.
surrogateModels – Surrogate models to be used. The default is (RbfModel(),). (default: (<blackboxopt.rbf.RbfModelobjectat0x7f0543f86d70>,))
disp (bool) – If True, print information about the optimization process. The default
is False. (default: False)
callback (Optional[Callable[[OptimizeResult], None]]) – If provided, the callback function will be called after each iteration
with the current optimization result. The default is None. (default: None)
Initialize the surrogate models for the constraints.
Parameters:
fun – The objective function to be minimized.
gfun – The constraint functions. Each constraint function must return a scalar
value. If the constraint function returns a value greater than zero, it
is considered a violation of the constraint.
bounds – List with the limits [x_min,x_max] of each direction x in the search
space.
mineval (int) – Minimum number of function evaluations to build the surrogate model.
maxeval (int) – Maximum number of function evaluations.
surrogateModels – Surrogate models to be used. The default is (RbfModel(),). (default: (<blackboxopt.rbf.RbfModelobjectat0x7f054486e590>,))
Minimize a scalar function of one or more variables using a response
surface model approach with restarts.
This implementation generalizes the algorithms Multistart LMSRS from [5].
The general algorithm calls surrogate_optimization() successive
times until there are no more function evaluations available. The first
time surrogate_optimization() is called with the given, if any, trained
surrogate model. Other function calls use an empty surrogate model. This is
done to enable truly different starting samples each time.
Parameters:
fun – The objective function to be minimized.
bounds – List with the limits [x_min,x_max] of each direction x in the
search space.
maxeval (int) – Maximum number of function evaluations.
surrogateModel – Surrogate model to be used. If None is provided, a
RbfModel model with median low-pass filter is used. (default: None)
batchSize (int) – Number of new sample points to be generated per iteration. (default: 1)
disp (bool) – If True, print information about the optimization process. (default: False)
callback (Optional[Callable[[OptimizeResult], None]]) – If provided, the callback function will be called after
each iteration with the current optimization result. (default: None)
Minimize a multiobjective function using the surrogate model approach
from [6].
Parameters:
fun – The objective function to be minimized.
bounds – List with the limits [x_min,x_max] of each direction x in the search
space.
maxeval (int) – Maximum number of function evaluations.
surrogateModels – Surrogate models to be used. The default is (RbfModel(),). (default: (<blackboxopt.rbf.RbfModelobjectat0x7f0543f86440>,))
acquisitionFunc (Optional[WeightedAcquisition]) – Acquisition function to be used in the CP step. The default is
WeightedAcquisition(0). (default: None)
acquisitionFuncGlobal (Optional[WeightedAcquisition]) – Acquisition function to be used in the global step. The default is
WeightedAcquisition(Sampler(0), 0.95). (default: None)
disp (bool) – If True, print information about the optimization process. The default
is False. (default: False)
callback (Optional[Callable[[OptimizeResult], None]]) – If provided, the callback function will be called after each iteration
with the current optimization result. The default is None. (default: None)
Minimize a scalar function of one or more variables using a surrogate
model and an acquisition strategy.
This is a more generic implementation of the RBF algorithm described in
[7], using multiple ideas from [8] especially in what concerns
mixed-integer optimization. Briefly, the implementation works as follows:
If a surrogate model or initial sample points are not provided,
choose the initial sample using a Symmetric Latin Hypercube design.
Evaluate the objective function at the initial sample points.
Repeat 3-8 until there are no function evaluations left.
Update the surrogate model with the last sample.
Acquire a new sample based on the provided acquisition function.
Evaluate the objective function at the new sample.
Update the optimization solution and best function value if needed.
Determine if there is a significant improvement and update counters.
Exit after nFailTol successive failures to improve the minimum.
Mind that, when solving mixed-integer optimization, the algorithm may
perform a continuous search whenever a significant improvement is found by
updating an integer variable. In the continuous search mode, the algorithm
executes step 4 only on continuous variables. The continuous search ends
when there are no significant improvements for a number of times as in
Müller (2016).
Parameters:
fun – The objective function to be minimized.
bounds – List with the limits [x_min,x_max] of each direction x in the
search space.
maxeval (int) – Maximum number of function evaluations.
x0y0 – Initial guess for the solution and the value of the objective
function at the initial guess. (default: ())
surrogateModel – Surrogate model to be used. If None is provided, a
RbfModel model with median low-pass filter is used.
On exit, if provided, the surrogate model is updated to represent the
one used in the last iteration. (default: None)
acquisitionFunc (Optional[AcquisitionFunction]) – Acquisition function to be used. If None is
provided, the TargetValueAcquisition is used. (default: None)
batchSize (int) – Number of new sample points to be generated per iteration. (default: 1)
improvementTol (float) – Expected improvement in the global optimum per
iteration. (default: 0.001)
nSuccTol (int) – Number of consecutive successes before updating the
acquisition when necessary. A zero value means there is no need to
update the acquisition based no the number of successes. (default: 3)
nFailTol (int) – Number of consecutive failures before updating the
acquisition when necessary. A zero value means there is no need to
update the acquisition based no the number of failures. (default: 5)
termination – Termination condition. Possible values: “nFailTol” and
None. (default: None)
performContinuousSearch (bool) – If True, the algorithm will perform a
continuous search when a significant improvement is found by updating an
integer variable. (default: True)
disp (bool) – If True, print information about the optimization process. (default: False)
callback (Optional[Callable[[OptimizeResult], None]]) – If provided, the callback function will be called after
each iteration with the current optimization result. (default: None)