dict_scalors_single {miesmuschel}R Documentation

Single Objective Scalor

Description

Scalor that uses a single given objective, throwing an error in case it is used in a multi-objective problem.

In contrast to ScalorOne, this Scalor throws an error when more than one objective is present. When this Scalor gets used as the default value, e.g. for a Selector, then it forces the user to make an explicit decision about what Scalor to use in a multi-objective setting.

Configuration Parameters

No configuration parameters.

Supported Operand Types

Supported Domain classes are: p_lgl ('ParamLgl'), p_int ('ParamInt'), p_dbl ('ParamDbl'), p_fct ('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("single")
scls("single")  # takes vector IDs, returns list of Scalors

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

Super classes

miesmuschel::MiesOperator -> miesmuschel::Scalor -> ScalorSingleObjective

Methods

Public methods

Inherited methods

Method new()

Initialize the ScalorSingleObjective object.

Usage
ScalorSingleObjective$new()

Method clone()

The objects of this class are cloneable with this method.

Usage
ScalorSingleObjective$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other scalors: Scalor, dict_scalors_aggregate, dict_scalors_domcount, dict_scalors_fixedprojection, dict_scalors_hypervolume, dict_scalors_nondom, dict_scalors_one, dict_scalors_proxy

Examples

ss = scl("single")
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_so = c(1, 5, 2, 3, 0)
fitnesses_mo = matrix(c(1, 5, 2, 3, 0, 3, 1, 0, 10, 8), ncol = 2)

ss$prime(p)

ss$operate(data, fitnesses_so)

try(ss$operate(data, fitnesses_mo))


[Package miesmuschel version 0.0.4-2 Index]