Random Search on Pool-Restricted or Discrete Objectives
Source:R/OptimizerPoolRandom.R
mlr_optimizers_pool_random.RdOptimizer that randomly samples configurations from a candidate pool when
the objective has the "pool_restricted" property (typically by inheriting from
ObjectivePoolAbstract), or from the full grid of a completely discrete
search space (where all parameters are paradox::p_int, paradox::p_fct,
or paradox::p_lgl).
When the search space is continuous (not fully discrete) and the objective is not pool-restricted, this optimizer falls back to uniform random search (like bbotk::OptimizerBatchRandomSearch).
Creates a new instance of this R6 class.
Arguments
- grid_expansion_limit
(
integer(1))
Upper limit on the number of rows to materialize for the full grid for discrete search spaces in Objectives that are not pool-restricted. An error is raised if the full grid would exceed this limit. This is to protect against accidental usage of too much memory. Default is1e7L.
Parameters
batch_sizeinteger(1)
Number of configurations per batch.Infevaluates the entire remaining pool in a single batch (forbidden whenreplace_samples = "within_batches"or when the objective is not pool-restricted). Default is1.max_batchesinteger(1)
Maximum number of batches to evaluate.Infmeans no batch limit (termination is governed solely by the instance's terminator). Default isInf.replace_samplescharacter(1)
Controls duplicate handling across evaluations:"never": configurations already present in the archive are excluded from sampling. The pool shrinks as evaluations accumulate."between_batches": each batch is drawn without replacement from the full pool, but previous batches do not affect future sampling."within_batches": samples inside each batch are drawn with replacement from the full pool, so duplicates are possible even within a single batch.
Default is
"never".