Class to terminate the tuning after the performance stagnates, i.e. does not improve more than threshold over the last iters iterations.

Format

R6::R6Class object inheriting from Terminator.

Construction

t = TerminatorStagnation$new()

Parameters

  • iters :: integer(1)
    Number of iterations to evaluate the performance improvement on, default is 10.

  • threshold :: numeric(1)
    If the improvement is less than threshold, tuning is stopped, default is 0.

See also

Examples

TerminatorStagnation$new()
#> <TerminatorStagnation> #> * Parameters: iters=10, threshold=0
term("stagnation", iters = 5, threshold = 1e-5)
#> <TerminatorStagnation> #> * Parameters: iters=5, threshold=1e-05