3.2.1. pywhy_graphs.algorithms.pds#
- pywhy_graphs.algorithms.pds(graph: PAG, node_x: int | float | str | Any, node_y: int | float | str | Any | None = None, max_path_length: int | None = None) Set[int | float | str | Any][source]#
- Find all PDS sets between node_x and node_y. - Parameters:
- graphPAG
- The graph. 
- node_xnode
- The node ‘x’. 
- node_ynode
- The node ‘y’. 
- max_path_lengthoptional, int
- The maximum length of a path to search on. By default None, which sets it to 1000. 
 
- Returns:
- dsepset
- The possibly d-separating set between node_x and node_y. 
 
 - Notes - Possibly d-separating (PDS) sets are nodes V, along an adjacency paths from ‘node_x’ to some ‘V’, which has the following characteristics for every subpath triple <X, Y, Z> on the path: - Y is a collider, or 
- Y is a triangle (i.e. X, Y and Z form a complete subgraph) 
 - If the path meets these characteristics, then ‘V’ is in the PDS set. - If Y is a triangle, then it will be uncertain with circular edges due to the fact that it is a shielded triple, not allowing us to infer that it is a collider. These are defined in [1] and [2]. - References