Skip to content

Commit e09eadb

Browse files
Remove add_modelling_assumptions) method
1 parent 7e01033 commit e09eadb

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed

causal_testing/json_front/json_class.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,6 @@ def _setup_test(self, causal_test_case: CausalTestCase, estimator: Estimator) ->
204204

205205
return causal_test_engine, estimation_model
206206

207-
def add_modelling_assumptions(self, estimation_model: Estimator): # pylint: disable=unused-argument
208-
"""Optional abstract method where user functionality can be written to determine what assumptions are required
209-
for specific test cases
210-
:param estimation_model: estimator model instance for the current running test.
211-
"""
212-
return
213-
214207
@staticmethod
215208
def setup_logger(log_path: str):
216209
"""Setups up logging instance for the module and adds a FileHandler stream so all stdout prints are also

examples/poisson/example_run_causal_tests.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,6 @@ def populate_num_shapes_unit(data):
149149
}
150150

151151

152-
class MyJsonUtility(JsonUtility):
153-
"""Extension of JsonUtility class to add modelling assumptions to the estimator instance"""
154-
155-
def add_modelling_assumptions(self, estimation_model: Estimator):
156-
# Add squared intensity term as a modelling assumption if intensity is the treatment of the test
157-
if "intensity" in estimation_model.treatment[0]:
158-
estimation_model.intercept = 0
159-
160-
161152
def test_run_causal_tests():
162153
ROOT = os.path.realpath(os.path.dirname(__file__))
163154

@@ -166,7 +157,7 @@ def test_run_causal_tests():
166157
dag_path = f"{ROOT}/dag.dot"
167158
data_path = f"{ROOT}/data.csv"
168159

169-
json_utility = MyJsonUtility(log_path) # Create an instance of the extended JsonUtility class
160+
json_utility = JsonUtility(log_path) # Create an instance of the extended JsonUtility class
170161
json_utility.set_paths(
171162
json_path, dag_path, [data_path]
172163
) # Set the path to the data.csv, dag.dot and causal_tests.json file
@@ -178,8 +169,8 @@ def test_run_causal_tests():
178169

179170

180171
if __name__ == "__main__":
181-
args = MyJsonUtility.get_args()
182-
json_utility = MyJsonUtility(args.log_path) # Create an instance of the extended JsonUtility class
172+
args = JsonUtility.get_args()
173+
json_utility = JsonUtility(args.log_path) # Create an instance of the extended JsonUtility class
183174
json_utility.set_paths(
184175
args.json_path, args.dag_path, args.data_path
185176
) # Set the path to the data.csv, dag.dot and causal_tests.json file

0 commit comments

Comments
 (0)