dict_filtors_surprog {miesmuschel} | R Documentation |
Progressive Surrogate Model Filtering
Description
Performs progressive surrogate model filtering. A surrogate model is used, as described in the parent class FiltorSurrogate
.
The filtering is "progressive" in that successive values are filtered more agressively.
Algorithm
Given the number n_filter
of of individuals to sample, and the desired pool size at round i
pool_size(i)
, progressive
surrogate model filtering proceeds as follows:
Train the
surrogate_learner
LearnerRegr
on theknown_values
and theirfitnesses
.Take
pool_size(1)
configurations, predict their expected performance using the surrogate model, and put them into a poolP
of configurations to consider.Initialize
i
to 1.Take the individual that is optimal according to predicted performance, remove it from
P
and add it to solution setS
.If the number of solutions in
S
equalsn_filter
, quit.If
pool_size(i + 1)
is larger thanpool_size(i)
, take the nextpool_size(i + 1) - pool_size(i)
configurations, predict their expected performance using the surrogate model, and add them toP
. Otherwise, removepool_size(i) - pool_size(i + 1)
random individuals from the pool. The size ofP
ends up beingpool_size(i + 1) - i
, asi
individuals have also been removed and added toS
.Increment
i
, jump to 4.
(The algorithm presented here is optimized for clarity; the actual implementation does all the surrogate model prediction in one go, but is functionally equivalent).
pool_size(i)
is calculated as round(n_filter * pool_factor * (pool_factor_last / pool_factor) ^ (i / n_filter))
, i.e. a log-linear interpolation from
pool_factor * n_filter
to pool_factor_last * n_filter
.
The pool_factor
and pool_factor_last
configuration parameters of this algorithm determine how agressively the surrogate model is used to
filter out sampled configurations. If the filtering is agressive (large values), then more "exploitation" at the cost of "exploration" is performed.
When pool_factor
is small but pool_factor_last
is large (or vice-versa), then different individuals are filtered with different agressiveness, potentially
leading to a tradeoff between "exploration" and "exploitation".
When pool_factor_last
is set, it defaults to pool_factor
, with no new individuals added and no individuals removed from the filter pool during filtering.
It is equivalent to taking the top n_filter
individuals out of a sample of n_filter * pool_factor
.
Configuration Parameters
FiltorSurrogateProgressive
's configuration parameters are the hyperparameters of the FiltorSurrogate
base class, as well as:
-
filter.pool_factor
::numeric(1)
pool_factor
parameter of the progressive surrogate model filtering algorithm, see the corresponding section. Initialized to 1. Together with the default offilter.pool_factor_last
, this is equivalent to random sampling new individuals. -
filter.pool_factor_last
::numeric(1)
pool_factor_last
parameter of the progressive surrogate model filtering algorithm, see the corresponding section. When not given, it defaults tofilter.pool_factor
, equivalent to taking the topn_filter
fromn_filter * pool_factor
individuals.
Supported Operand Types
See FiltorSurrogate
about supported operand types.
Dictionary
This Filtor
can be created with the short access form ftr()
(ftrs()
to get a list), or through the the dictionary
dict_filtors
in the following way:
# preferred: ftr("surprog", <surrogate_learner> [, <surrogate_selector>]) ftrs("surprog", <surrogate_learner> [, <surrogate_selector>]) # takes vector IDs, returns list of Filtors # long form: dict_filtors$get("surprog", <surrogate_learner> [, <surrogate_selector>])
Super classes
miesmuschel::MiesOperator
-> miesmuschel::Filtor
-> miesmuschel::FiltorSurrogate
-> FiltorSurrogateProgressive
Methods
Public methods
Inherited methods
Method new()
Initialize the FiltorSurrogateProgressive
.
Usage
FiltorSurrogateProgressive$new( surrogate_learner, surrogate_selector = SelectorBest$new() )
Arguments
surrogate_learner
(
mlr3::LearnerRegr
)
Regression learner for the surrogate model filtering algorithm.
The$surrogate_learner
field will reflect this value.surrogate_learner
(
mlr3::LearnerRegr
)
Regression learner for the surrogate model filtering algorithm.
The$surrogate_learner
field will reflect this value.surrogate_selector
(
Selector
)Selector
for the surrogate model filtering algorithm.
The$surrogate_selector
field will reflect this value.surrogate_selector
(
Selector
)Selector
for the surrogate model filtering algorithm.
The$surrogate_selector
field will reflect this value.
Method clone()
The objects of this class are cloneable with this method.
Usage
FiltorSurrogateProgressive$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
See Also
Other filtors:
Filtor
,
FiltorSurrogate
,
dict_filtors_maybe
,
dict_filtors_null
,
dict_filtors_proxy
,
dict_filtors_surtour
Examples
library("mlr3")
library("mlr3learners")
fp = ftr("surprog", lrn("regr.lm"), filter.pool_factor = 2)
p = ps(x = p_dbl(-5, 5))
known_data = data.frame(x = 1:5)
fitnesses = 1:5
new_data = data.frame(x = c(2.5, 4.5))
fp$prime(p)
fp$needed_input(1)
fp$operate(new_data, known_data, fitnesses, 1)