From c3747713adc8b38e152d090a23ad461ee7c35f2d Mon Sep 17 00:00:00 2001 From: kenneth-lee-ch Date: Thu, 22 Aug 2024 15:44:05 -0400 Subject: [PATCH] fixed finding possible parents --- causallearn/search/ConstraintBased/FCI.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/causallearn/search/ConstraintBased/FCI.py b/causallearn/search/ConstraintBased/FCI.py index 44f46f98..e7ca0554 100644 --- a/causallearn/search/ConstraintBased/FCI.py +++ b/causallearn/search/ConstraintBased/FCI.py @@ -582,8 +582,7 @@ def is_possible_parent(graph: Graph, potential_parent_node, child_node): if not graph.is_adjacent_to(potential_parent_node, child_node): return False - if graph.get_endpoint(child_node, potential_parent_node) == Endpoint.ARROW or \ - graph.get_endpoint(potential_parent_node, child_node) == Endpoint.TAIL: + if graph.get_endpoint(child_node, potential_parent_node) == Endpoint.ARROW: return False else: return True