Skip to content

Commit 51c5c10

Browse files
Proof of concept test case for new execute_test
1 parent 1d93d00 commit 51c5c10

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

causal_testing/testing/causal_test_engine.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,9 @@ def execute_test_suite(self, test_suite: CausalTestSuite) -> list[CausalTestResu
9999
results[estimator_class.__name__] = causal_test_results
100100
test_suite_results[edge] = results
101101
return test_suite_results
102-
103102
def execute_test(self, estimator: type(Estimator), causal_test_case: CausalTestCase) -> CausalTestResult:
104103
"""Execute a causal test case and return the causal test result.
105104
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-
116105
:param estimator: A reference to an Estimator class.
117106
:param causal_test_case: The CausalTestCase object to be tested
118107
: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
138127

139128
causal_test_result = self._return_causal_test_results(estimator, causal_test_case)
140129
return causal_test_result
141-
142130
def _return_causal_test_results(self, estimator, causal_test_case):
143131
"""Depending on the estimator used, calculate the 95% confidence intervals and return in a causal_test_result
144132

0 commit comments

Comments
 (0)