Skip to content

Commit

Permalink
Bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
daphne12345 committed Aug 29, 2024
1 parent 2ceab26 commit 46cc7c4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deepcave/evaluators/mo_ablation.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ def calculate(
df[normed] = (df[obj.name] - df[obj.name].min()) / (
df[obj.name].max() - df[obj.name].min()
)

if obj.optimize == "upper":
df[normed] = 1-df[normed]
objectives_normed.append(normed)

# train one model per objective
Expand Down
2 changes: 2 additions & 0 deletions deepcave/evaluators/mo_fanova.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def calculate(
df[normed] = (df[obj.name] - df[obj.name].min()) / (
df[obj.name].max() - df[obj.name].min()
)
if obj.optimize == "upper":
df[normed] = 1-df[normed]
objectives_normed.append(normed)
df = df.dropna(subset=objectives_normed)
X = df[self.hp_names].to_numpy()
Expand Down
2 changes: 2 additions & 0 deletions deepcave/evaluators/mo_lpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ def calculate(
df[normed] = (df[obj.name] - df[obj.name].min()) / (
df[obj.name].max() - df[obj.name].min()
)
if obj.optimize == "upper":
df[normed] = 1-df[normed]
objectives_normed.append(normed)
df = df.dropna(subset=objectives_normed)
X = df[self.hp_names].to_numpy()
Expand Down

0 comments on commit 46cc7c4

Please sign in to comment.