R: Minimal logging object for objective function evaluations

ArchiveBest {bbotk} | R Documentation

## Minimal logging object for objective function evaluations

### Description

The ArchiveBest stores no data but records the best scoring evaluation passed to `$add_evals()`. The Archive API is fully implemented but many parameters are ignored and some methods do nothing. The archive still works with TerminatorClockTime, TerminatorEvals, TerminatorNone and TerminatorEvals.

### Super class

`bbotk::Archive` -> `ArchiveBest`

### Active bindings

`n_evals`

  (`integer(1)`)
  Number of evaluations stored in the archive.

`n_batch`

  (`integer(1)`)
  Number of batches stored in the archive.

### Methods

#### Public methods

- `ArchiveBest$new()`

- `ArchiveBest$add_evals()`

- `ArchiveBest$best()`

- `ArchiveBest$clone()`

Inherited methods

- `bbotk::Archive$clear()`

- `bbotk::Archive$format()`

- `bbotk::Archive$print()`

#### Method `new()`

Creates a new instance of this R6 class.

##### Usage

    ArchiveBest$new(
      search_space,
      codomain,
      check_values = FALSE,
      store_x_domain = FALSE
    )

##### Arguments

`search_space`

  (paradox::ParamSet)
  Specifies the search space for the Optimizer. The paradox::ParamSet describes either a subset of the `domain` of the Objective or it describes a set of parameters together with a `trafo` function that transforms values from the search space to values of the domain. Depending on the context, this value defaults to the domain of the objective.

`codomain`

  (paradox::ParamSet)
  Specifies codomain of function. Most importantly the tags of each output "Parameter" define whether it should be minimized or maximized. The default is to minimize each component.

`check_values`

  (`logical(1)`)
  ignored.

`store_x_domain`

  (`logical(1)`)
  Determines if x values, should be stored in `$data$x_domain` as list items. The trafo will be applied if defined in `search_space`.

#### Method `add_evals()`

Stores the best result in `ydt`.

##### Usage

    ArchiveBest$add_evals(xdt, xss_trafoed = NULL, ydt)

##### Arguments

`xdt`

  (`data.table::data.table()`)
  Set of untransformed points / points from the search space. One point per row, e.g. `data.table(x1 = c(1, 3), x2 = c(2, 4))`. Column names have to match ids of the `search_space`. However, `xdt` can contain additional columns.

`xss_trafoed`

  (`list()`)
  Transformed point(s) in the domain space.

`ydt`

  (`data.table::data.table()`)
  Optimal outcome.

#### Method `best()`

Returns the best scoring evaluation. For single-crit optimization, the solution that minimizes / maximizes the objective function. For multi-crit optimization, the Pareto set / front.

##### Usage

    ArchiveBest$best(m = NULL)

##### Arguments

`m`

  (`integer()`)
  ignored.

##### Returns

`data.table::data.table()`

#### Method `clone()`

The objects of this class are cloneable with this method.

##### Usage

    ArchiveBest$clone(deep = FALSE)

##### Arguments

`deep`

  Whether to make a deep clone.

[Package bbotk version 0.3.1 Index]