Direct acquisition function optimizer.
Calls nloptr() from nloptr with the NLOPT_GN_DIRECT_L algorithm.
In its default setting, the algorithm runs for at most 100 * D^2 function evaluations,
where D is the dimension of the search space.
The optimization stops when the relative tolerance of the parameters is less than 10^-4.
Only fully numeric search spaces (all parameters of type p_dbl) are supported.
Note
NLOPT_GN_DIRECT_L is a deterministic global optimizer that ignores the starting point.
Restarts would only repeat the identical search, so the optimizer does not support them.
Parameters
skip_already_evaluatedlogical(1)
Should the proposed candidate be rejected if it was already evaluated on the actual bbotk::OptimInstance? IfTRUEand the candidate was already evaluated, an error is raised so that theloop_functioncan propose a randomly sampled point instead. Default isTRUE.
Termination Parameters
The following termination parameters can be used.
stopvalnumeric(1)
Stop value. Deactivate with-Inf(Default).maxevalinteger(1)
Maximum number of evaluations. Default is100 * D^2, whereDis the dimension of the search space. Deactivate with-1L.xtol_relnumeric(1)
Relative tolerance of the parameters. Default is10^-4. Deactivate with-1.xtol_absnumeric(1)
Absolute tolerance of the parameters. Deactivate with-1(Default).ftol_relnumeric(1)
Relative tolerance of the objective function. Deactivate with-1(Default).ftol_absnumeric(1)
Absolute tolerance of the objective function. Deactivate with-1(Default).
Super class
AcqOptimizer -> AcqOptimizerDirect
Public fields
state(
nloptr::nloptr()result)
Result of the last optimization run.
Active bindings
print_id(
character)
Id used when printing.label(
character(1))
Label for this object. Can be used in tables, plot and text output instead of the ID.man(
character(1))
String in the format[pkg]::[topic]pointing to a manual page for this object.
Methods
Inherited methods
AcqOptimizerDirect$new()
Creates a new instance of this R6 class.
Usage
AcqOptimizerDirect$new(acq_function = NULL)Arguments
acq_function(
NULL| AcqFunction).
AcqOptimizerDirect$optimize()
Optimize the acquisition function.
Returns
data.table::data.table() with 1 row per candidate.
AcqOptimizerDirect$reset()
Reset the acquisition function optimizer.
Clears the state of the previous optimization run.
Examples
if (requireNamespace("nloptr")) {
acqo("direct")
}
#> Loading required namespace: nloptr
#> <AcqOptimizerDirect>: (OptimizerDirect)
#> * Parameters: skip_already_evaluated=TRUE, catch_errors=TRUE