3.2.2. pywhy_graphs.algorithms.pds_path#
- pywhy_graphs.algorithms.pds_path(graph: PAG, node_x: Union[int, float, str, Any], node_y: Union[int, float, str, Any], max_path_length: Optional[int] = None) Set[Union[int, float, str, Any]] [source]#
Compute the possibly-d-separating set path.
Returns the PDS_path set defined in definition 3.4 of [1].
- Parameters:
graph : PAG
The graph.
node_x : node
The starting node.
node_y : node
The ending node
max_path_length : int, optional
The maximum length of a path to search on for PDS set, by default None, which sets it to 1000.
- Returns:
pds_path : set
The set of nodes in the possibly d-separating path set.
Notes
This is a smaller subset compared to possibly-d-separating sets. It takes the PDS set and intersects it with the biconnected components of the adjacency graph that contains the edge (node_x, node_y).
The current implementation calls
pds
and then restricts the nodes that it returns.