Skip to contents

Optimizer that generates a pool of candidates and evaluates them all. This is an extension of bbotk::OptimizerBatchRandomSearch that allows for more flexible candidate generation.

Creates a new instance of this R6 class.

Parameters

  • candidate_generator (function)
    Function to generate candidate points. Must have signature function(search_space, n) and return a data.table of n candidates. Default is candidate_generator_lhs().

  • pool_size (integer(1))
    Number of candidates to generate and evaluate. If NULL, calculates remaining evaluations from the terminator (requires bbotk::TerminatorEvals). Default is to use the remaining evaluations from the terminator.

Examples

if (FALSE) { # \dontrun{
optimizer <- opt("pool")
optimizer$param_set$set_values(
  candidate_generator = candidate_generator_lhs(),
  pool_size = 100L
)
} # }