dict_scalors_proxy: Proxy-Scalor that Scales According to its Configuration...

dict_scalors_proxyR Documentation

Proxy-Scalor that Scales According to its Configuration parameter

Description

Scalor that performs the operation in its operation configuration parameter. This is useful, e.g., to make SelectorBest's operation fully parametrizable.

Configuration Parameters

  • operation :: Scalor
    Operation to perform. Initialized to ScalorSingleObjective. This is primed when ⁠$prime()⁠ of ScalorProxy is called, and also when ⁠$operate()⁠ is called, to make changing the operation as part of self-adaption possible. However, if the same operation gets used inside multiple ScalorProxy objects, then it is recommended to ⁠$clone(deep = TRUE)⁠ the object before assigning them to operation to avoid frequent re-priming.

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("proxy")
scls("proxy")  # takes vector IDs, returns list of Scalors

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

Super classes

miesmuschel::MiesOperator -> miesmuschel::Scalor -> ScalorProxy

Methods

Public methods

Inherited methods

Method new()

Initialize the ScalorProxy object.

Usage
ScalorProxy$new()

Method prime()

See MiesOperator method. Primes both this operator, as well as the operator given to the operation configuration parameter. Note that this modifies the ⁠$param_set$values$operation⁠ object.

Usage
ScalorProxy$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
ScalorProxy$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_single

Other scalor wrappers: dict_scalors_aggregate, dict_scalors_fixedprojection

Examples

set.seed(1)
sp = scl("proxy")
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 = c(1, 5, 2, 3, 0)

sp$param_set$values$operation = scl("one")
sp$prime(p)
sp$operate(data, fitnesses)


miesmuschel documentation built on Sept. 11, 2024, 8:23 p.m.