| SelectorScalar {miesmuschel} | R Documentation | 
Selector making use of Scalors
Description
Base class inheriting from Selector for selection operations that make use of scalar values, generated by Scalor.
Inheriting
SelectorScaling is an abstract base class and should be inherited from. Inheriting classes should implement the private $.select_scalar()
function. During $operate(), the $.select_scalar() function is called, it should have three arguments, similar to Selector's $.select() function.
values and n_select are as given to $.select() of the Selector. The fitnesses argument is first scaled by the associated Scalor
and then passed on as a numeric vector.
Typically, $initialize() should also be overloaded when inheriting.
Super classes
miesmuschel::MiesOperator -> miesmuschel::Selector -> SelectorScalar
Active bindings
Methods
Public methods
Inherited methods
Method new()
Initialize base class components of the SelectorScalar.
Usage
SelectorScalar$new(
  scalor = ScalorSingleObjective$new(),
  is_deterministic = FALSE,
  param_classes = c("ParamLgl", "ParamInt", "ParamDbl", "ParamFct"),
  param_set = ps(),
  supported = scalor$supported,
  packages = character(0),
  dict_entry = NULL
)Arguments
- scalor
- ( - Scalor)
 - Scalorto use to generate scalar values from multiple objectives, if multi-objective optimization is performed. Initialized to- ScalorSingleObjective: Doing single-objective optimization normally, throwing an error if used in multi-objective setting: In that case, a- Scalorneeds to be explicitly chosen.
- is_deterministic
- ( - logical(1))
 Whether the- Selectoris deterministic. Setting this to- TRUEadds a configuration parameter- shuffle_selection(initialized to- TRUE) that causes the selection to be shuffled.
- 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|- listof- expression)
 Strategy parameters of the operator. This should be created by the subclass and given to- super$initialize(). If this is a- ParamSet, it is used as the- MiesOperator's- ParamSetdirectly. Otherwise it must be a- listof expressions e.g. created by- alist()that evaluate to- ParamSets, possibly referencing- selfand- private. These- ParamSetare then combined using a- ParamSetCollection. Default is the empty- ParamSet.
 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 to the supported set of- scalor.
 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 is- character(0).
 The- $packagesfield will reflect this values.
- dict_entry
- ( - character(1)|- NULL)
 Key of the class inside the- Dictionary(usually one of- dict_mutators,- dict_recombinators,- dict_selectors), where it can be retrieved using a short access function. May be- NULLif the operator is not entered in a dictionary.
 The- $dict_entryfield will reflect this value.
Method prime()
See MiesOperator method. Primes both this operator, as well as the wrapped operator
given to scalor during construction.
Usage
SelectorScalar$prime(param_set)
Arguments
- param_set
- ( - ParamSet)
 Passed to- MiesOperator- $prime().
Returns
invisible self.
Method clone()
The objects of this class are cloneable with this method.
Usage
SelectorScalar$clone(deep = FALSE)
Arguments
- deep
- Whether to make a deep clone. 
See Also
Other base classes: 
Filtor,
FiltorSurrogate,
MiesOperator,
Mutator,
MutatorDiscrete,
MutatorNumeric,
OperatorCombination,
Recombinator,
RecombinatorPair,
Scalor,
Selector
Other selectors: 
Selector,
dict_selectors_best,
dict_selectors_maybe,
dict_selectors_null,
dict_selectors_proxy,
dict_selectors_random,
dict_selectors_sequential,
dict_selectors_tournament