diff --git a/package/samplers/moead/_elite_population_selection_strategy.py b/package/samplers/moead/_elite_population_selection_strategy.py index 865b04d5..d6124438 100644 --- a/package/samplers/moead/_elite_population_selection_strategy.py +++ b/package/samplers/moead/_elite_population_selection_strategy.py @@ -1,8 +1,5 @@ from __future__ import annotations -from _scalar_aggregation_func import pbi -from _scalar_aggregation_func import tchebycheff -from _scalar_aggregation_func import weighted_sum import numpy as np from optuna import Study from optuna.study import StudyDirection @@ -10,6 +7,9 @@ from scipy.spatial import cKDTree from scipy.stats import qmc +from ._scalar_aggregation_func import tchebycheff +from ._scalar_aggregation_func import weighted_sum + class MOEAdElitePopulationSelectionStrategy: def __init__( @@ -26,8 +26,6 @@ def __init__( if scalar_aggregation_func == "tchebycheff": self._scalar_aggregation_func = tchebycheff - elif scalar_aggregation_func == "PBI": - self._scalar_aggregation_func = pbi elif scalar_aggregation_func == "weighted_sum": self._scalar_aggregation_func = weighted_sum else: diff --git a/package/samplers/moead/_scalar_aggregation_func.py b/package/samplers/moead/_scalar_aggregation_func.py index 4f627c1e..6c13dab6 100644 --- a/package/samplers/moead/_scalar_aggregation_func.py +++ b/package/samplers/moead/_scalar_aggregation_func.py @@ -26,18 +26,3 @@ def tchebycheff( ref = np.array(reference_point) nadir = np.array(nadir_point) return float(np.max(lambda_ * np.abs((value - ref) / (nadir - ref)))) - - -# TODO: Is this method correct? -def pbi( - weight_vector: list[float], - trial: FrozenTrial, - reference_point: list[float], - nadir_point: list[float], - theta: float = 5.0, -) -> float: - diff = trial.values - reference_point - d1 = np.dot(diff, weight_vector) - d2 = np.linalg.norm(diff - d1 * weight_vector) - - return d1 + theta * d2 diff --git a/package/samplers/moead/moead.py b/package/samplers/moead/moead.py index 0cbc2999..5925bb09 100644 --- a/package/samplers/moead/moead.py +++ b/package/samplers/moead/moead.py @@ -6,8 +6,6 @@ from typing import Dict from typing import TYPE_CHECKING -from _child_generation_strategy import MOEAdChildGenerationStrategy -from _elite_population_selection_strategy import MOEAdElitePopulationSelectionStrategy import optuna from optuna.distributions import BaseDistribution from optuna.samplers import BaseSampler @@ -18,6 +16,9 @@ from optuna.search_space import IntersectionSearchSpace from optuna.trial import FrozenTrial +from ._child_generation_strategy import MOEAdChildGenerationStrategy +from ._elite_population_selection_strategy import MOEAdElitePopulationSelectionStrategy + if TYPE_CHECKING: from optuna.study import Study