Skip to content

Aggregation strategy

smac.multi_objective.aggregation_strategy #

MeanAggregationStrategy #

MeanAggregationStrategy(
    scenario: Scenario,
    objective_weights: list[float] | None = None,
)

Bases: AbstractMultiObjectiveAlgorithm

A class to mean-aggregate multi-objective costs to a single cost.

Parameters#

scenario : Scenario objective_weights : list[float] | None, defaults to None Weights for an weighted average. Must be of the same length as the number of objectives.

Source code in smac/multi_objective/aggregation_strategy.py
def __init__(
    self,
    scenario: Scenario,
    objective_weights: list[float] | None = None,
):
    super(MeanAggregationStrategy, self).__init__()

    if objective_weights is not None and scenario.count_objectives() != len(objective_weights):
        raise ValueError("Number of objectives and number of weights must be equal.")

    self._objective_weights = objective_weights

meta property #

meta: dict[str, Any]

Returns the meta data of the created object.

update_on_iteration_start #

update_on_iteration_start() -> None

Update the internal state on start of each SMBO iteration.

Source code in smac/multi_objective/abstract_multi_objective_algorithm.py
def update_on_iteration_start(self) -> None:
    """Update the internal state on start of each SMBO iteration."""
    pass