Skip to content

Commit 7dd7683

Browse files
xrowanxrowan
andauthored
updates dependency dowhy to v0.7 (#568)
* bump dowhy * specifies number of simulations for testing random common cause refutation * uncomments imports * tests 10 simulations for dowhy notebooks Co-authored-by: xrowan <[email protected]>
1 parent b030fb6 commit 7dd7683

File tree

4 files changed

+759
-759
lines changed

4 files changed

+759
-759
lines changed

econml/tests/test_dowhy.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
class TestDowhy(unittest.TestCase):
1919

2020
def _get_data(self):
21-
X = np.random.normal(0, 1, size=(500, 5))
22-
T = np.random.binomial(1, .5, size=(500,))
23-
Y = np.random.normal(0, 1, size=(500,))
24-
Z = np.random.normal(0, 1, size=(500,))
21+
X = np.random.normal(0, 1, size=(250, 5))
22+
T = np.random.binomial(1, .5, size=(250,))
23+
Y = np.random.normal(0, 1, size=(250,))
24+
Z = np.random.normal(0, 1, size=(250,))
2525
return Y, T, X[:, [0]], X[:, 1:], Z
2626

2727
def test_dowhy(self):
@@ -65,7 +65,7 @@ def clf():
6565
# test causal graph
6666
est_dowhy.view_model()
6767
# test refutation estimate
68-
est_dowhy.refute_estimate(method_name="random_common_cause")
68+
est_dowhy.refute_estimate(method_name="random_common_cause", num_simulations=3)
6969
if name != "orf":
7070
est_dowhy.refute_estimate(method_name="add_unobserved_common_cause",
7171
confounders_effect_on_treatment="binary_flip",

0 commit comments

Comments
 (0)