R: Terminator that stops after a number of evaluations

mlr_terminators_evals {bbotk} | R Documentation

## Terminator that stops after a number of evaluations

### Description

Class to terminate the optimization depending on the number of evaluations. An evaluation is defined by one resampling of a parameter value.

### Dictionary

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

    mlr_terminators$get("evals")
    trm("evals")

### Parameters

`n_evals`

  `integer(1)`
  Number of allowed evaluations, default is 100L.

### Super class

`bbotk::Terminator` -> `TerminatorEvals`

### Methods

#### Public methods

- `TerminatorEvals$new()`

- `TerminatorEvals$is_terminated()`

- `TerminatorEvals$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

    TerminatorEvals$new()

#### Method `is_terminated()`

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

##### Usage

    TerminatorEvals$is_terminated(archive)

##### Arguments

`archive`

  (Archive).

##### Returns

`logical(1)`.

#### Method `clone()`

The objects of this class are cloneable with this method.

##### Usage

    TerminatorEvals$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_none`, `mlr_terminators_perf_reached`, `mlr_terminators_run_time`, `mlr_terminators_stagnation_batch`, `mlr_terminators_stagnation`, `mlr_terminators`

### Examples

    TerminatorEvals$new()
    trm("evals", n_evals = 5)

[Package bbotk version 0.3.2 Index]