mlr_terminators_evals {bbotk} | R Documentation |
Class to terminate the optimization depending on the number of evaluations.
An evaluation is defined by one resampling of a parameter value.
The total number of evaluations B
is defined as
B = \mathrm{n_evals} + k * D
where D
is the dimension of the search space.
This Terminator can be instantiated via the
dictionary mlr_terminators or with the associated
sugar function trm()
:
mlr_terminators$get("evals") trm("evals")
n_evals
integer(1)
See formula above. Default is 100.
k
integer(1)
See formula above. Default is 0.
bbotk::Terminator
-> TerminatorEvals
new()
Creates a new instance of this R6 class.
TerminatorEvals$new()
is_terminated()
Is TRUE
iff the termination criterion is positive, and FALSE
otherwise.
TerminatorEvals$is_terminated(archive)
archive
(Archive).
logical(1)
.
clone()
The objects of this class are cloneable with this method.
TerminatorEvals$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other Terminator:
Terminator
,
mlr_terminators_clock_time
,
mlr_terminators_combo
,
mlr_terminators_none
,
mlr_terminators_perf_reached
,
mlr_terminators_run_time
,
mlr_terminators_stagnation_batch
,
mlr_terminators_stagnation
,
mlr_terminators
TerminatorEvals$new()
# 5 evaluations in total
trm("evals", n_evals = 5)
# 3 * [dimension of search space] evaluations in total
trm("evals", n_evals = 0, k = 3)
# (3 * [dimension of search space] + 1) evaluations in total
trm("evals", n_evals = 1, k = 3)