Skip to content

Commit 9f9fd02

Browse files
committed
Fixed the "all the tests are failing" bug
1 parent bf8b67a commit 9f9fd02

File tree

2 files changed

+1002
-201
lines changed

2 files changed

+1002
-201
lines changed

examples/poisson/causal_test_setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def populate_num_lines_unit(data):
9292

9393
def populate_num_shapes_unit(data):
9494
area = data['width'] * data['height']
95-
data['num_shapes_unit'] = data['num_lines_abs'] / area
95+
data['num_shapes_unit'] = data['num_shapes_abs'] / area
9696

9797

9898
def get_args() -> argparse.Namespace:
@@ -178,6 +178,7 @@ def add_modelling_assumptions(self, estimation_model: Estimator):
178178
# Add squared intensity term as a modelling assumption if intensity is the treatment of the test
179179
if "intensity" in estimation_model.treatment[0]:
180180
estimation_model.add_squared_term_to_df("intensity")
181+
estimation_model.intercept = 0
181182
if isinstance(estimation_model, WidthHeightEstimator):
182183
estimation_model.add_product_term_to_df("width", "intensity")
183184
estimation_model.add_product_term_to_df("height", "intensity")

0 commit comments

Comments
 (0)