3.1.5. pywhy_graphs.algorithms.is_definite_noncollider#
- pywhy_graphs.algorithms.is_definite_noncollider(G: PAG, node1: Union[int, float, str, Any], node2: Union[int, float, str, Any], node3: Union[int, float, str, Any]) bool [source]#
Check if <node1, node2, node3> path forms a definite non-collider.
Definite noncolliders have the form:
node1 - node2 -> node3, or
node1 <- node2 - node3, or
node1 -o node2 o- node3 with node1 and node3 non-adjacent
- Parameters:
node1 : node
A node on the path to check.
node2 : node
A node on the path to check.
node3 : node
A node on the path to check.
- Returns:
is_noncollider : bool
Whether or not the path is a definite non-collider. If it is not a definite non-collider, then it may be a definite collider, or uncertain.