@@ -110,21 +110,21 @@ def execute_test(self, estimator: type(Estimator), data_collector: Observational
110
110
causal_test_result = self ._return_causal_test_results (estimator )
111
111
return causal_test_result
112
112
113
- def _return_causal_test_results (self , estimator , causal_test_case ):
113
+ def _return_causal_test_results (self , estimator ):
114
114
"""Depending on the estimator used, calculate the 95% confidence intervals and return in a causal_test_result
115
115
116
116
:param estimator: An Estimator class object
117
117
:param causal_test_case: The concrete test case to be executed
118
118
:return: a CausalTestResult object containing the confidence intervals
119
119
"""
120
- if not hasattr (estimator , f"estimate_{ causal_test_case .estimate_type } " ):
121
- raise AttributeError (f"{ estimator .__class__ } has no { causal_test_case .estimate_type } method." )
122
- estimate_effect = getattr (estimator , f"estimate_{ causal_test_case .estimate_type } " )
123
- effect , confidence_intervals = estimate_effect (** causal_test_case .estimate_params )
120
+ if not hasattr (estimator , f"estimate_{ self .estimate_type } " ):
121
+ raise AttributeError (f"{ estimator .__class__ } has no { self .estimate_type } method." )
122
+ estimate_effect = getattr (estimator , f"estimate_{ self .estimate_type } " )
123
+ effect , confidence_intervals = estimate_effect (** self .estimate_params )
124
124
causal_test_result = CausalTestResult (
125
125
estimator = estimator ,
126
- test_value = TestValue (causal_test_case .estimate_type , effect ),
127
- effect_modifier_configuration = causal_test_case .effect_modifier_configuration ,
126
+ test_value = TestValue (self .estimate_type , effect ),
127
+ effect_modifier_configuration = self .effect_modifier_configuration ,
128
128
confidence_intervals = confidence_intervals ,
129
129
)
130
130
0 commit comments