|
1 |
| - |
| 1 | +import logging |
2 | 2 | import numpy as np
|
3 | 3 | import pandas as pd
|
4 | 4 | import scipy
|
|
10 | 10 | from causal_testing.testing.estimators import Estimator
|
11 | 11 | from causal_testing.specification.scenario import Scenario
|
12 | 12 | from causal_testing.specification.variable import Input, Output, Meta
|
13 |
| -import logging |
14 |
| -data_path = "data.csv" |
15 |
| -dag_path = "dag.dot" |
16 |
| -json_path = "causal_tests.json" |
17 | 13 |
|
18 | 14 |
|
19 | 15 | class WidthHeightEstimator(LinearRegressionEstimator):
|
@@ -147,10 +143,9 @@ def logger_setup():
|
147 | 143 | "LinearRegressionEstimator": LinearRegressionEstimator,
|
148 | 144 | }
|
149 | 145 |
|
150 |
| - |
151 | 146 | # Create input structure required to create a modelling scenario
|
152 |
| -modelling_inputs = [Input(i['name'], i['type'], distributions[i['distribution']]) for i in inputs] +\ |
153 |
| - [Output(i['name'], i['type']) for i in outputs] +\ |
| 147 | +modelling_inputs = [Input(i['name'], i['type'], distributions[i['distribution']]) for i in inputs] + \ |
| 148 | + [Output(i['name'], i['type']) for i in outputs] + \ |
154 | 149 | [Meta(i['name'], i['type'], populates[i['populate']]) for i in metas] if metas else list()
|
155 | 150 |
|
156 | 151 | # Create modelling scenario to access z3 variable mirrors
|
@@ -181,9 +176,9 @@ def add_modelling_assumptions(self, estimation_model: Estimator):
|
181 | 176 |
|
182 | 177 | if __name__ == "__main__":
|
183 | 178 | args = MyJsonUtility.get_args()
|
184 |
| - |
185 | 179 | json_utility = MyJsonUtility(args.log_path) # Create an instance of the extended JsonUtility class
|
186 |
| - json_utility.set_path(json_path, dag_path, data_path) # Set the path to the data.csv, dag.dot and causal_tests.json file |
| 180 | + json_utility.set_path(args.json_path, args.dag_path, |
| 181 | + args.data_path) # Set the path to the data.csv, dag.dot and causal_tests.json file |
187 | 182 |
|
188 | 183 | # Load the Causal Variables into the JsonUtility class ready to be used in the tests
|
189 | 184 | json_utility.set_variables(inputs, outputs, metas, distributions, populates)
|
|
0 commit comments