Skip to contents

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

Dictionary

This Terminator can be instantiated via the dictionary mlr_terminators or with the associated sugar function trm():

mlr_terminators$get("stagnation")
trm("stagnation")

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, optimization is stopped, default is 0.

Super class

bbotk::Terminator -> TerminatorStagnation

Methods

Inherited methods


Method new()

Creates a new instance of this R6 class.

Usage


Method is_terminated()

Is TRUE iff the termination criterion is positive, and FALSE otherwise.

Usage

TerminatorStagnation$is_terminated(archive)

Arguments

archive

(Archive).

Returns

logical(1).


Method clone()

The objects of this class are cloneable with this method.

Usage

TerminatorStagnation$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

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