Skip to content

Commit

Permalink
adjust tests to new threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-sofia committed Feb 8, 2025
1 parent 0c80428 commit 2fbd7e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions tests/test_effect_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ def test_direct_effect_estimation_partially_directed(self):

model = IIDSampleGenerator(
edges=[
SampleEdge(NodeReference("X"), NodeReference("Z"), 5),
SampleEdge(NodeReference("Y"), NodeReference("Z"), 6),
SampleEdge(NodeReference("W"), NodeReference("X"), 3),
SampleEdge(NodeReference("W"), NodeReference("Y"), 4),
SampleEdge(NodeReference("X"), NodeReference("Z"), 1),
SampleEdge(NodeReference("Y"), NodeReference("Z"), 1),
SampleEdge(NodeReference("W"), NodeReference("X"), 1),
SampleEdge(NodeReference("W"), NodeReference("Y"), 1),
],
)

tst = PC()
sample_size = 1000000
sample_size = 100000
test_data, graph = model.generate(sample_size)
tst.create_graph_from_data(test_data)
tst.create_all_possible_edges()
Expand All @@ -217,14 +217,14 @@ def test_direct_effect_estimation_partially_directed(self):
tst.graph.edge_value(tst.graph.nodes["X"], tst.graph.nodes["Z"])[
"direct_effect"
],
5.0,
1.0,
0,
)
self.assertAlmostEqual(
tst.graph.edge_value(tst.graph.nodes["Y"], tst.graph.nodes["Z"])[
"direct_effect"
],
6.0,
1.0,
0,
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_pc_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def test_orientation_conflict_tracking(self):
SampleEdge(NodeReference("U4"), NodeReference("X"), 1),
],
)
test_data, graph = causal_insufficiency_four_nodes.generate(10000)
test_data, graph = causal_insufficiency_four_nodes.generate(1000)
test_data.pop("U1")
test_data.pop("U2")
test_data.pop("U3")
Expand Down

0 comments on commit 2fbd7e2

Please sign in to comment.