R: Terminator that stops when optimization does not improve

mlr_terminators_stagnation_batch {bbotk} | R Documentation

## Terminator that stops when optimization does not improve

### Description

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

### Dictionary

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

    mlr_terminators$get("stagnation_batch")
    trm("stagnation_batch")

### Parameters

`n`

  `integer(1)`
  Number of batches to evaluate the performance improvement on, default is 1.

`threshold`

  `numeric(1)`
  If the improvement is less than `threshold`, optimization is stopped, default is `0`.

### Super class

`bbotk::Terminator` -> `TerminatorStagnationBatch`

### Methods

#### Public methods

- `TerminatorStagnationBatch$new()`

- `TerminatorStagnationBatch$is_terminated()`

- `TerminatorStagnationBatch$clone()`

Inherited methods

- `bbotk::Terminator$format()`

- `bbotk::Terminator$print()`

- `bbotk::Terminator$remaining_time()`

- `bbotk::Terminator$status()`

#### Method `new()`

Creates a new instance of this R6 class.

##### Usage

    TerminatorStagnationBatch$new()

#### Method `is_terminated()`

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

##### Usage

    TerminatorStagnationBatch$is_terminated(archive)

##### Arguments

`archive`

  (Archive).

##### Returns

`logical(1)`.

#### Method `clone()`

The objects of this class are cloneable with this method.

##### Usage

    TerminatorStagnationBatch$clone(deep = FALSE)

##### Arguments

`deep`

  Whether to make a deep clone.

### See Also

Other Terminator: `Terminator`, `mlr_terminators_clock_time`, `mlr_terminators_combo`, `mlr_terminators_evals`, `mlr_terminators_none`, `mlr_terminators_perf_reached`, `mlr_terminators_run_time`, `mlr_terminators_stagnation`, `mlr_terminators`

### Examples

    TerminatorStagnationBatch$new()
    trm("stagnation_batch", n = 1, threshold = 1e-5)

[Package bbotk version 0.5.3 Index]