diff --git a/deepcave/evaluators/mo_fanova.py b/deepcave/evaluators/mo_fanova.py index aea7e421..fb344fa0 100644 --- a/deepcave/evaluators/mo_fanova.py +++ b/deepcave/evaluators/mo_fanova.py @@ -92,7 +92,6 @@ def calculate( objectives, budget, specific=True, include_combined_cost=True ) - # normalize objectives objectives_normed = list() for obj in objectives: diff --git a/deepcave/evaluators/mo_lpi.py b/deepcave/evaluators/mo_lpi.py index 1decbcec..8166f70b 100644 --- a/deepcave/evaluators/mo_lpi.py +++ b/deepcave/evaluators/mo_lpi.py @@ -121,7 +121,6 @@ def calculate( objectives=objectives, budget=budget, specific=True, include_combined_cost=True ) - # normalize objectives assert isinstance(objectives, list) objectives_normed = list() diff --git a/deepcave/utils/multi_objective_importance.py b/deepcave/utils/multi_objective_importance.py index e557f82f..eb658392 100644 --- a/deepcave/utils/multi_objective_importance.py +++ b/deepcave/utils/multi_objective_importance.py @@ -21,8 +21,8 @@ from typing import List -import pandas as pd import numpy as np +import pandas as pd def is_pareto_efficient(costs): @@ -42,7 +42,7 @@ def is_pareto_efficient(costs): is_efficient = np.ones(costs.shape[0], dtype=bool) for i, c in enumerate(costs): is_efficient[i] = np.all(np.any(costs[:i] > c, axis=1)) and np.all( - np.any(costs[i + 1:] > c, axis=1) + np.any(costs[i + 1 :] > c, axis=1) ) return is_efficient @@ -65,7 +65,5 @@ def get_weightings(objectives_normed: List[str], df: pd.DataFrame) -> np.ndarray """ optimized = is_pareto_efficient(df[objectives_normed].to_numpy()) return ( - df[optimized][objectives_normed] - .T.apply(lambda values: values / values.sum()) - .T.to_numpy() - ) \ No newline at end of file + df[optimized][objectives_normed].T.apply(lambda values: values / values.sum()).T.to_numpy() + )