| Scalor {miesmuschel} | R Documentation |
Scalor Base Class
Description
Base class representing ranking operations, inheriting from MiesOperator.
A Scalor gets a table of individuals as input, along with information on the individuals' performance values
and returns a vector of a possible scalarization of individuals' fitness (or other qualities).
Scalors can be used by Selectors as a basis to select individuals by. This way it is possible to have tournament
selection (SelectorTournament) or elite selection (SelectorBest) based on different, configurable qualities of
individuals.
Unlike most other operator types inheriting from MiesOperator, the $operate() function has two arguments, which are passed on to $.scale()
-
values::data.frame
Individuals to operate on. Must pass the check of theParamSetgiven in the last$prime()call and may not have any missing components. -
fitnesses::numeric|matrix
Fitnesses for each individual given invalues. If this is anumeric, then its length must be equal to the number of rows invalues. If this is amatrix, if number of rows must be equal to the number of rows invalues, and it must have one column when doing single-crit optimization and one column each for each "criterion" when doing multi-crit optimization.
Note that fitness values are always maximized, both in single- and multi-criterion optimization, so objective output is multiplied with-1if it is tagged as"minimize".
The return value of an operation should be a numeric vector with one finite value for each entry of values, assigning high values to individuals in
some way more "desirable" than others with low values.
Inheriting
Scalor is an abstract base class and should be inherited from. Inheriting classes should implement the private $.scale()
function. The user of the object calls $operate(), and the arguments are passed on to private $.scale() after checking that
the operator is primed, that the values argument conforms to the primed domain and that other values match. Typically, the $initialize() function
should also be overloaded, and optionally the $prime() function; they should call their super equivalents.
Super class
miesmuschel::MiesOperator -> Scalor
Active bindings
supported(
character)
Optimization supported by thisScalor, can be"single-crit","multi-crit", or both.
Methods
Public methods
Inherited methods
Method new()
Initialize base class components of the Mutator.
Usage
Scalor$new(
param_classes = c("ParamLgl", "ParamInt", "ParamDbl", "ParamFct"),
param_set = ps(),
supported = c("single-crit", "multi-crit"),
packages = character(0),
dict_entry = NULL,
own_param_set = quote(self$param_set)
)Arguments
param_classes(
character)
Classes of parameters that the operator can handle. May contain any of"ParamLgl","ParamInt","ParamDbl","ParamFct". Default is all of them.
The$param_classesfield will reflect this value.param_set(
ParamSet|listofexpression)
Strategy parameters of the operator. This should be created by the subclass and given tosuper$initialize(). If this is aParamSet, it is used as theMiesOperator'sParamSetdirectly. Otherwise it must be alistof expressions e.g. created byalist()that evaluate toParamSets, possibly referencingselfandprivate. TheseParamSetare then combined using aParamSetCollection. Default is the emptyParamSet.
The$param_setfield will reflect this value.supported(
character)
Subset of"single-crit"and"multi-crit", indicating wether single and / or multi-criterion optimization is supported. Default both of them.
The$supportedfield will reflect this value.packages(
character) Packages that need to be loaded for the operator to function. This should be declared so these packages can be loaded when operators run on parallel instances. Default ischaracter(0).
The$packagesfield will reflect this values.dict_entry(
character(1)|NULL)
Key of the class inside theDictionary(usually one ofdict_mutators,dict_recombinators,dict_selectors), where it can be retrieved using a short access function. May beNULLif the operator is not entered in a dictionary.
The$dict_entryfield will reflect this value.own_param_set(
language)
An expression that evaluates to aParamSetindicating the configuration parameters that are entirely owned by this operator class (and not proxied from a construction argument object). This should bequote(self$param_set)(the default) when theparam_setargument is not a list of expressions.
Method clone()
The objects of this class are cloneable with this method.
Usage
Scalor$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
Other base classes:
Filtor,
FiltorSurrogate,
MiesOperator,
Mutator,
MutatorDiscrete,
MutatorNumeric,
OperatorCombination,
Recombinator,
RecombinatorPair,
Selector,
SelectorScalar
Other scalors:
dict_scalors_aggregate,
dict_scalors_domcount,
dict_scalors_fixedprojection,
dict_scalors_hypervolume,
dict_scalors_nondom,
dict_scalors_one,
dict_scalors_proxy,
dict_scalors_single