Skip to content

Commit 06e199d

Browse files
committed
Poisson tests using frontend
1 parent ddb302d commit 06e199d

File tree

3 files changed

+178
-185
lines changed

3 files changed

+178
-185
lines changed

causal_testing/testing/metamorphic_relation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def to_json_stub(self, skip=True) -> dict:
4545
"estimator": "LinearRegressionEstimator",
4646
"estimate_type": "coefficient",
4747
"effect": "direct",
48-
"mutations": [self.base_test_case.treatment_variable],
48+
"treatment_variable": self.base_test_case.treatment_variable,
4949
"expected_effect": {self.base_test_case.outcome_variable: "SomeEffect"},
5050
"formula": (
5151
f"{self.base_test_case.outcome_variable} ~ "
@@ -71,7 +71,7 @@ def to_json_stub(self, skip=True) -> dict:
7171
"estimator": "LinearRegressionEstimator",
7272
"estimate_type": "coefficient",
7373
"effect": "direct",
74-
"mutations": [self.base_test_case.treatment_variable],
74+
"treatment_variable": self.base_test_case.treatment_variable,
7575
"expected_effect": {self.base_test_case.outcome_variable: "NoEffect"},
7676
"formula": (
7777
f"{self.base_test_case.outcome_variable} ~ "

examples/poisson-line-process/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@ To run this case study:
99
3. Run the command `python example_pure_python.py` to demonstrate causal testing using pure python.
1010

1111
This should print a series of causal test results and produce two CSV files. `intensity_num_shapes_results_random_1000.csv` corresponds to table 1, and `width_num_shapes_results_random_1000.csv` relates to our findings regarding the relationship of width and `P_u`.
12+
13+
## Running using the main entrypoint
14+
You should be able to run the main entrypoint by simply running the following command from within this directory:
15+
16+
```
17+
python -m causal_testing --dag_path dag.dot --data_paths data/random/data_random_1000.csv --test_config causal_tests.json --output results/test_results.json
18+
```

0 commit comments

Comments
 (0)