Skip to content

Commit 9f56a70

Browse files
Pass data into setup
1 parent 0861ab1 commit 9f56a70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/covasim_/doubling_beta/example_beta.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def doubling_beta_CATE_on_csv(
5252

5353
# Read in the observational data, perform identification
5454
past_execution_df = pd.read_csv(observational_data_path)
55-
data_collector, _, causal_test_case, causal_specification = setup(observational_data_path)
55+
data_collector, _, causal_test_case, causal_specification = setup(past_execution_df)
5656

5757
linear_regression_estimator = LinearRegressionEstimator(
5858
"beta",
@@ -218,7 +218,7 @@ def doubling_beta_CATEs(observational_data_path: str, simulate_counterfactual: b
218218
age_contact_fig.savefig(outpath_base_str + "age_contact_executions.pdf", format="pdf")
219219

220220

221-
def setup(observational_data_path):
221+
def setup(observational_data):
222222
# 1. Read in the Causal DAG
223223
causal_dag = CausalDAG(f"{ROOT}/dag.dot")
224224

@@ -263,7 +263,7 @@ def setup(observational_data_path):
263263
)
264264

265265
# 7. Create a data collector
266-
data_collector = ObservationalDataCollector(scenario, pd.read_csv(observational_data_path))
266+
data_collector = ObservationalDataCollector(scenario, observational_data)
267267

268268
# 8. Obtain the minimal adjustment set for the base test case from the causal DAG
269269
minimal_adjustment_set = causal_dag.identification(base_test_case)

0 commit comments

Comments
 (0)