R/ScalorAggregate.R
dict_scalors_aggregate.Rd
This operation has the configuration parameters of the Scalor
s that it wraps: The configuration
parameters of the operator given to the scalors
construction argument are prefixed with "scalor_1"
,
"scalor_2"
, ... up to "scalor_#"
, where #
is length(scalors)
.
Additional configuration parameters:
weight_1
, weight_2
, ... :: numeric(1)
Weight factors of scalors[[1]]
, scalors[[2]]
, etc. Depending on scaling
, the outputs of scalors
is multiplied with this (when scaling
is "linear"
or "rank"
), or ties between ranks are broken
with it (when scaling
is "tiebreak"
). Initialized to 1.
scaling
:: character(1)
How to calculate output values, one of "linear"
, "rank"
or "tiebreak"
. When scaling
is "linear"
,
then the output is calculated as the weighted sum of the outputs of scalors
, weighted by weight_1
,
weight_2
etc. When scaling
is "rank"
, then the output is calculated as the weighted sum of the
rank()
of scalors
, weighted by weight_1
, weight_2
etc., with ties broken by average. When scaling
is "tiebreak"
, then the output is calculated as the averaged rank()
of the scalors
with the
highest weight_#
, with ties broken by the average rank()
of the second highest weight_#
, with
remaining ties broken by scalors
with third highest weight_#
etc. Initialized to "linear"
.
scale_output
:: logical(1)
Whether to scale the output to lie between 0 and 1. Initialized to FALSE
.
This Scalor
can be created with the short access form scl()
(scls()
to get a list), or through the the dictionary
dict_scalors
in the following way:
Other scalors:
Scalor
,
dict_scalors_domcount
,
dict_scalors_fixedprojection
,
dict_scalors_hypervolume
,
dict_scalors_nondom
,
dict_scalors_one
,
dict_scalors_proxy
,
dict_scalors_single
Other scalor wrappers:
dict_scalors_fixedprojection
,
dict_scalors_proxy
miesmuschel::MiesOperator
-> miesmuschel::Scalor
-> ScalorAggregate
prime()
See MiesOperator
method. Primes both this operator, as well as the wrapped operators
given to scalors
during construction.
param_set
(ParamSet
)
Passed to MiesOperator
$prime()
.
invisible self
.
p = ps(x = p_dbl(-5, 5))
data = data.frame(x = rep(0, 5))
sa = scl("aggregate", list(
scl("one", objective = 1),
scl("one", objective = 2)
))
sa$prime(p)
(fitnesses = matrix(c(1, 5, 2, 3, 0, 3, 1, 0, 10, 8), ncol = 2))
#> [,1] [,2]
#> [1,] 1 3
#> [2,] 5 1
#> [3,] 2 0
#> [4,] 3 10
#> [5,] 0 8
# to see the fitness matrix, use:
## plot(fitnesses, pch = as.character(1:5))
# default weight 1 -- sum of both objectives
sa$operate(data, fitnesses)
#> [1] 4 6 2 13 8
# only first objective
sa$param_set$values[c("weight_1", "weight_2")] = c(1, 0)
sa$operate(data, fitnesses)
#> [1] 1 5 2 3 0
# only 2 * second objective
sa$param_set$values[c("weight_1", "weight_2")] = c(0, 2)
sa$operate(data, fitnesses)
#> [1] 6 2 0 20 16