Skip to content

Commit 0b91c5e

Browse files
Move and update README.md
1 parent 1110d6f commit 0b91c5e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

causal_testing/json_front/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# JSON Causal Testing Framework Frontend
2+
3+
The JSON frontend allows Causal Tests and parameters to be specified in JSON to allow for tests to be quickly written
4+
whilst retaining the flexibility of the Causal Testing Framework (CTF).
5+
6+
An example is provided in `examples/poisson` which will be walked through in this README to better understand
7+
the framework
8+
9+
`examples/poisson/causal_test_setup.py` contains python code written by the user to implement scenario specific features
10+
such as:
11+
1. Custom Estimators
12+
2. Causal Variable specification
13+
3. Causal test case outcomes
14+
4. Meta constraint functions
15+
5. Mapping JSON distributions, effects, and estimators to python objects
16+
17+
`examples/poisson/causal_tests.json` is the JSON file that allows for the easy specification of multiple causal tests.
18+
Each test requires:
19+
1. Test name
20+
2. Mutations
21+
3. Estimator
22+
4. Estimate_type
23+
5. Effect modifiers
24+
6. Expected effects
25+
7. Skip: boolean that if set true the test won't be executed and will be skipped
26+
27+
To run the JSON frontend example from the root directory of the project, use
28+
`python examples\poisson\causal_test_setup.py --directory_path="examples/poisson"`
29+
30+
A failure flag `-f` can be specified to stop the framework running if a test is failed
31+
`python examples\poisson\causal_test_setup.py -f --directory_path="examples/poisson"`
32+

0 commit comments

Comments
 (0)