Sampler-Based Search on Pool-Restricted or Discrete Objectives
Source:R/OptimizerPoolSample.R
mlr_optimizers_pool_sample.RdOptimizer that samples configurations with a SpaceSampler 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 samples directly from the search space.
Creates a new instance of this R6 class.
Arguments
- space_sampler
(SpaceSampler)
Sampler used to draw each batch. Default is SpaceSamplerUniform.- 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.
Fields
space_sampler(SpaceSampler)
Wrapped sampler.param_set(paradox::ParamSet)
Combined parameter set of this optimizer and the wrapped sampler.
Parameters
batch_sizeinteger(1)
Number of configurations per batch.Infevaluates the entire remaining pool in a single batch whenreplace_samples = "never", or the full pool in each batch whenreplace_samples = "between_batches".Infis forbidden when the objective is not pool-restricted and the search space is not fully discrete. 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 sampled from the full pool, but previous batches do not affect future sampling.
Default is
"never".pass_known_poollogical(1)
Whether evaluated configurations from the archive are passed to the SpaceSampler'ssample()method asknown_pool. Default isTRUE.
The wrapped sampler's parameters are exposed with a space_sampler. prefix.