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
)
Scalor
to use to generate scalar values from multiple objectives, if multi-objective optimization is performed. Initialized toScalorSingleObjective
: Doing single-objective optimization normally, throwing an error if used in multi-objective setting: In that case, aScalor
needs to be explicitly chosen.is_deterministic
(
logical(1)
)
Whether theSelector
is deterministic. Setting this toTRUE
adds a configuration parametershuffle_selection
(initialized toTRUE
) 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_classes
field will reflect this value.param_set
(
ParamSet
|list
ofexpression
)
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
'sParamSet
directly. Otherwise it must be alist
of expressions e.g. created byalist()
that evaluate toParamSet
s, possibly referencingself
andprivate
. TheseParamSet
are then combined using aParamSetCollection
. Default is the emptyParamSet
.
The$param_set
field 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 ofscalor
.
The$supported
field 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$packages
field 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 beNULL
if the operator is not entered in a dictionary.
The$dict_entry
field 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 toMiesOperator
$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