Skip to content

Commit 75c2972

Browse files
add causal_test_suite.py class
1 parent bf23559 commit 75c2972

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
class CausalTestSuite:
2+
"""
3+
A CausalTestSuite is a class holding a dictionary, where the keys are base_test_cases representing the treatment
4+
and outcome Variables, and the values are test objects. Test Objects hold a causal_test_case_list which is a
5+
list of causal_test_cases which provide control and treatment values, and an iterator of Estimator Class References
6+
7+
This structure can be fed into the CausalTestEngines execute_test_suite function which will iterate over all the
8+
base_test_case's and execute each causal_test_case with each iterator.
9+
"""
10+
11+
def __init__(
12+
self,
13+
):
14+
self.test_suite = {}
15+
16+
def add_test_object(self, base_test_case, causal_test_case_list, estimators):
17+
test_object = {'tests': causal_test_case_list, 'estimators': list(estimators)}
18+
self.test_suite['base_test_case'] = test_object
19+
20+
def get_single_test_object(self, base_test_case):
21+
return self.test_suite[base_test_case]

0 commit comments

Comments
 (0)