Uses a Filtor
to extract a subset of individuals from a given set. The individuals are either returned directly (when get_indivs
is TRUE
)
or in form of an index into the given individuals (when get_indivs
is FALSE
).
Filtor
s must always select individuals without replacement, so selected individual indices are unique.
mies_filter_offspring(
inst,
individuals,
lambda,
filtor = NULL,
budget_id = NULL,
fidelity = NULL,
get_indivs = TRUE
)
(OptimInstance
)
Optimization instance to evaluate.
(data.frame
| data.table
)
Individuals to filter. Must have columns according to filtor$primed_ps
, and must have at least filtor$needed_input(lambda)
rows.
(integer(1)
)
Number of individuals to filter down to.
(Filtor
| NULL
)Filtor
operator that filters. When NULL
is given, then the FiltorNull
operation is performed and the first lambda
individuals are
taken from individuals
.
(character(1)
| NULL
)
Budget component when doing multi-fidelity optimization. This component of the search space is added
to individuals
according to fidelity
. Should be NULL
when no multi-fidelity optimization is performed (default).
(atomic
| NULL
)
scalar indicating the value of the budget_id
component with which to evaluate individuals to be filtered.
This value must be NULL
when no multi-fidelity optimization is performed, but it may also be NULL
when the
maximum value of the budget_id
found in inst$archive
should be used (the default).
(logical(1)
)
Whether to return the data.frame
or data.table
of selected individuals, or an index into individuals
.
If get_indivs
is TRUE
: a data.frame
or data.table
(depending on the input type of individuals
) of filtered configurations.
If get_indivs
is FALSE
: an integer
vector indexing the filtered individuals.