@@ -99,20 +99,9 @@ def execute_test_suite(self, test_suite: CausalTestSuite) -> list[CausalTestResu
99
99
results [estimator_class .__name__ ] = causal_test_results
100
100
test_suite_results [edge ] = results
101
101
return test_suite_results
102
-
103
102
def execute_test (self , estimator : type (Estimator ), causal_test_case : CausalTestCase ) -> CausalTestResult :
104
103
"""Execute a causal test case and return the causal test result.
105
104
106
- Test case execution proceeds with the following steps:
107
- (1) Check that data has been loaded using the method load_data
108
- (2) Check loaded data for any positivity violations and warn the user if so
109
- (3) Instantiate the estimator with the values of the causal test case.
110
- (4) Using the estimator, estimate the average treatment effect of the changing the treatment from control value
111
- to treatment value on the outcome of interest, adjusting for the identified adjustment set.
112
- (5) Depending on the estimator used, compute 95% confidence intervals for the estimate.
113
- (6) Store results in an instance of CausalTestResults.
114
- (7) Apply test oracle procedure to assign a pass/fail to the CausalTestResult and return.
115
-
116
105
:param estimator: A reference to an Estimator class.
117
106
:param causal_test_case: The CausalTestCase object to be tested
118
107
:return causal_test_result: A CausalTestResult for the executed causal test case.
@@ -138,7 +127,6 @@ def execute_test(self, estimator: type(Estimator), causal_test_case: CausalTestC
138
127
139
128
causal_test_result = self ._return_causal_test_results (estimator , causal_test_case )
140
129
return causal_test_result
141
-
142
130
def _return_causal_test_results (self , estimator , causal_test_case ):
143
131
"""Depending on the estimator used, calculate the 95% confidence intervals and return in a causal_test_result
144
132
0 commit comments