Skip to content

Commit

Permalink
add metadata of which exact tests removes edge in collidertests
Browse files Browse the repository at this point in the history
  • Loading branch information
LilithWittmann committed Feb 7, 2025
1 parent 98f7275 commit bb8ebc2
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions causy/causal_discovery/constraint/orientation_rules/pc.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,16 @@ def process(
u=y,
v=z,
action=TestResultAction.DO_NOTHING,
data={"orientation_conflict": True},
data={
"orientation_conflict": True,
"between": {"x": x, "y": y, "z": z},
},
)
return TestResult(
u=y,
v=z,
action=TestResultAction.REMOVE_EDGE_DIRECTED,
data={},
data={"between": {"x": x, "y": y, "z": z}},
)

if graph.only_directed_edge_exists(y, z) and graph.undirected_edge_exists(
Expand All @@ -277,7 +280,10 @@ def process(
u=x,
v=z,
action=TestResultAction.DO_NOTHING,
data={"orientation_conflict": True},
data={
"orientation_conflict": True,
"between": {"x": x, "y": y, "z": z},
},
)
return TestResult(
u=x,
Expand Down Expand Up @@ -326,7 +332,7 @@ def process(
u=y,
v=x,
action=TestResultAction.REMOVE_EDGE_DIRECTED,
data={},
data={"between": {"x": x, "y": y, "z": z}},
)
)
if (
Expand All @@ -339,7 +345,7 @@ def process(
u=x,
v=y,
action=TestResultAction.REMOVE_EDGE_DIRECTED,
data={},
data={"between": {"x": x, "y": y, "z": z}},
)
)
return results
Expand Down

0 comments on commit bb8ebc2

Please sign in to comment.