Skip to content

Commit

Permalink
Remove redundant benchmark condition. (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
kklein authored Aug 15, 2024
1 parent b883d62 commit fccde2c
Showing 1 changed file with 27 additions and 34 deletions.
61 changes: 27 additions & 34 deletions benchmarks/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,41 +544,34 @@ def dict_to_markdown_file(d, filename="comparison.md"):
)
print_separator()

if metalearner in {
"S",
"T",
"X",
"R",
"DR",
}: # implemented multivariant support
print(
"Start comparing libraries on synthetic data with continuous "
"outcomes, multiple treatments and linear treatment effect."
)
losses[f"{metalearner}-learner"][
"synthetic_data_continuous_outcome_multi_treatment_linear_te"
] = losses_synthetic_data(
is_classification=False,
metalearner=metalearner,
propensity_score=[0.2, 0.1, 0.3, 0.15, 0.25],
)
print_separator()
print(
"Start comparing libraries on synthetic data with continuous "
"outcomes, multiple treatments and linear treatment effect."
)
losses[f"{metalearner}-learner"][
"synthetic_data_continuous_outcome_multi_treatment_linear_te"
] = losses_synthetic_data(
is_classification=False,
metalearner=metalearner,
propensity_score=[0.2, 0.1, 0.3, 0.15, 0.25],
)
print_separator()

print(
"Start comparing libraries on synthetic data with continuous "
"outcomes, multiple treatments and constant treatment effect."
)
losses[f"{metalearner}-learner"][
"synthetic_data_continuous_outcome_multi_treatment_constant_te"
] = losses_synthetic_data(
is_classification=False,
metalearner=metalearner,
propensity_score=[0.2, 0.1, 0.3, 0.15, 0.25],
tau=np.array([-2, 5, 0, 3]),
)
print_separator()
# TODO: Add benchmarking with classification outcomes and multiple treatments,
# when data_generation allows for it.
print(
"Start comparing libraries on synthetic data with continuous "
"outcomes, multiple treatments and constant treatment effect."
)
losses[f"{metalearner}-learner"][
"synthetic_data_continuous_outcome_multi_treatment_constant_te"
] = losses_synthetic_data(
is_classification=False,
metalearner=metalearner,
propensity_score=[0.2, 0.1, 0.3, 0.15, 0.25],
tau=np.array([-2, 5, 0, 3]),
)
print_separator()
# TODO: Add benchmarking with classification outcomes and multiple treatments,
# when data_generation allows for it.

dict_to_json_file(losses)
dict_to_markdown_file(losses)

0 comments on commit fccde2c

Please sign in to comment.