3.1.5. pywhy_graphs.algorithms.is_definite_noncollider#

pywhy_graphs.algorithms.is_definite_noncollider(G: PAG, node1: int | float | str | Any, node2: int | float | str | Any, node3: 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:
node1node

A node on the path to check.

node2node

A node on the path to check.

node3node

A node on the path to check.

Returns:
is_noncolliderbool

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.