|
3 | 3 |
|
4 | 4 | class CausalTestSuite(UserDict):
|
5 | 5 | """
|
6 |
| - A CausalTestSuite is a class holding a dictionary, where the keys are base_test_cases representing the treatment |
7 |
| - and outcome Variables, and the values are test objects. Test Objects hold a causal_test_case_list which is a |
8 |
| - list of causal_test_cases which provide control and treatment values, and an iterator of Estimator Class References |
| 6 | + A CausalTestSuite is an extension of the UserDict class, therefore it behaves as a python dictionary with the added |
| 7 | + functionality of this class. |
| 8 | + The dictionary structure should be the keys are base_test_cases representing the treatment and outcome Variables, |
| 9 | + and the values are test objects. Test Objects hold a causal_test_case_list which is a list of causal_test_cases |
| 10 | + which provide control and treatment values, and an iterator of Estimator Class References |
9 | 11 |
|
10 |
| - This structure can be fed into the CausalTestEngines execute_test_suite function which will iterate over all the |
| 12 | + This dictionary can be fed into the CausalTestEngines execute_test_suite function which will iterate over all the |
11 | 13 | base_test_case's and execute each causal_test_case with each iterator.
|
12 | 14 | """
|
13 | 15 |
|
14 | 16 | def add_test_object(self, base_test_case, causal_test_case_list, estimators, estimate_type: str = "ate"):
|
| 17 | + """ |
| 18 | + A setter object to allow for the easy construction of the dictionary test suite structure |
| 19 | +
|
| 20 | + :param base_test_case: A BaseTestCase object consisting of a treatment variable, outcome variable and effect |
| 21 | + :param causal_test_case_list: A list of causal test cases to be executed |
| 22 | + :param estimators: A list of estimators, the execute_test_suite function in the TestEngine will produce a list |
| 23 | + of test results for each estimator |
| 24 | + :param estimate_type: A string which denotes the type of estimate to return |
| 25 | + """ |
15 | 26 | test_object = {"tests": causal_test_case_list, "estimators": estimators, "estimate_type": estimate_type}
|
16 | 27 | self.data[base_test_case] = test_object
|
0 commit comments