Skip to content

Commit

Permalink
Normalizing LCBenchTabularResult
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeratyoy committed Oct 23, 2023
1 parent 6704bc9 commit 72225d9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/mfpbench/lcbench_tabular/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,32 +134,32 @@ class LCBenchTabularResult(Result[LCBenchTabularConfig, int]):
@property
def score(self) -> float:
"""The score of interest."""
return self.val_accuracy
return self.val_score

@property
def error(self) -> float:
"""The error of interest."""
return 1 - self.val_error
return self.val_error

@property
def val_score(self) -> float:
"""The score on the validation set."""
return self.val_accuracy
return self.val_accuracy / 100

@property
def val_error(self) -> float:
"""The error on the validation set."""
return 1 - self.val_accuracy
return (100 - self.val_accuracy) / 100

@property
def test_score(self) -> float:
"""The score on the test set."""
return self.test_accuracy
return self.test_accuracy / 100

@property
def test_error(self) -> float:
"""The error on the test set."""
return 1 - self.test_accuracy
return (100 - self.test_accuracy) / 100

@property
def cost(self) -> float:
Expand Down Expand Up @@ -279,7 +279,7 @@ def __init__(
super().__init__(
table=table, # type: ignore
name=benchmark_task_name,
config_name="config_id",
config_name="id",
fidelity_name=cls.fidelity_name,
result_keys=LCBenchTabularResult.names(),
config_keys=LCBenchTabularConfig.names(),
Expand Down

0 comments on commit 72225d9

Please sign in to comment.