Scalor that returns a the fitness value of a single objective dimension as scale.

Configuration Parameters

  • objective :: integer(1)
    objective to return as scale, ranges from 1 (the default, first objective) to the number of objectives of the function being optimized.

Supported Operand Types

Supported Param classes are: ParamLgl, ParamInt, ParamDbl, ParamFct

Dictionary

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:

# preferred:
scl("one")
scls("one")  # takes vector IDs, returns list of Scalors

# long form:
dict_scalors$get("one")

Super classes

miesmuschel::MiesOperator -> miesmuschel::Scalor -> ScalorOne

Methods

Inherited methods


Method new()

Initialize the ScalorOne object.

Usage

ScalorOne$new()


Method clone()

The objects of this class are cloneable with this method.

Usage

ScalorOne$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

so = scl("one")
p = ps(x = p_dbl(-5, 5))
# dummy data; note that ScalorOne does not depend on data content
data = data.frame(x = rep(0, 5))
fitnesses = matrix(c(1, 5, 2, 3, 0, 3, 1, 0, 10, 8), ncol = 2)

so$prime(p)

so$operate(data, fitnesses)
#> [1] 1 5 2 3 0

so$param_set$values$objective = 2

so$operate(data, fitnesses)
#> [1]  3  1  0 10  8