Terminator that stops after a number of evaluations
Source:R/TerminatorEvals.R
mlr_terminators_evals.Rd
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 = \mathtt{n\_evals} + \mathtt{k} * D $$ where \(D\) is the dimension of the search space.
Dictionary
This Terminator can be instantiated via the
dictionary mlr_terminators or with the associated
sugar function trm()
:
Parameters
n_evals
integer(1)
See formula above. Default is 100.k
integer(1)
See formula above. Default is 0.
Super class
bbotk::Terminator
-> TerminatorEvals
Methods
Method is_terminated()
Is TRUE
iff the termination criterion is positive, and FALSE
otherwise.
Arguments
archive
(Archive).
Examples
TerminatorEvals$new()
#> <TerminatorEvals>: Number of Evaluation
#> * Parameters: n_evals=100, k=0
# 5 evaluations in total
trm("evals", n_evals = 5)
#> <TerminatorEvals>: Number of Evaluation
#> * Parameters: n_evals=5, k=0
# 3 * [dimension of search space] evaluations in total
trm("evals", n_evals = 0, k = 3)
#> <TerminatorEvals>: Number of Evaluation
#> * Parameters: n_evals=0, k=3
# (3 * [dimension of search space] + 1) evaluations in total
trm("evals", n_evals = 1, k = 3)
#> <TerminatorEvals>: Number of Evaluation
#> * Parameters: n_evals=1, k=3