Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalizing LCBenchTabularResult #7

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed this fix on my end to get it working.

fidelity_name=cls.fidelity_name,
result_keys=LCBenchTabularResult.names(),
config_keys=LCBenchTabularConfig.names(),
Expand Down