Performs tournament surrogate model filtering. A surrogate model is used, as described in the parent class FiltorSurrogate
.
Selects individuals from a tournament by taking the top per_tournament
individuals, according to surrogate_selector
and
as predicted by surrogate_learner
, from a sample of tournament_size(i)
, where tournament_size(1)
is given by
tournament_size
, tournament_size(ceiling(n_filter / per_tournament))
is given by tournament_size_last
, and
tournament_size(i)
for i
between these values is linearly interpolated on a log scale.
FiltorSurrogateProgressive
's configuration parameters are the hyperparameters of the FiltorSurrogate
base class, as well as:
filter.per_tournament
:: integer(1)
Number of individuals to select from each tournament. If per_tournament
is not a divider of n_filter
, then
the last tournament selects a random subset of n_filter %% per_tournament
individuals out of the top per_tournament
individuals.
Initialized to 1.
filter.tournament_size
:: numeric(1)
Tournament size used for filtering. If tournament_size_last
is not given, all n_filter
individuals are selected
in batches of per_tournament
from tournaments of this size. If it is given, then the actual tournament size is interpolated
between tournament_size
and tournament_size_last
on a logarithmic scale.
Tournaments with tournament size below per_tournament
select per_tournament
individuals without tournament, i.e. no filtering.
Initialized to 1.
filter.tournament_size_last
:: numeric(1)
Tournament size used for the last tournament, see description of tournament_size
. Defaults to tournament_size
when not given,
i.e. all tournaments have the same size.
See FiltorSurrogate
about supported operand types.
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:
Other filtors:
Filtor
,
FiltorSurrogate
,
dict_filtors_maybe
,
dict_filtors_null
,
dict_filtors_proxy
,
dict_filtors_surprog
miesmuschel::MiesOperator
-> miesmuschel::Filtor
-> miesmuschel::FiltorSurrogate
-> FiltorSurrogateTournament
new()
Initialize the FiltorSurrogateTournament
.
FiltorSurrogateTournament$new(
surrogate_learner,
surrogate_selector = SelectorBest$new()
)
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.
library("mlr3")
library("mlr3learners")
fp = ftr("surtour", lrn("regr.lm"), filter.tournament_size = 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)
#> [1] 2
fp$operate(new_data, known_data, fitnesses, 1)
#> [1] 2