3.2.2. pywhy_graphs.algorithms.pds_path#

pywhy_graphs.algorithms.pds_path(graph: PAG, node_x: int | float | str | Any, node_y: int | float | str | Any, max_path_length: int | None = None) Set[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:
graphPAG

The graph.

node_xnode

The starting node.

node_ynode

The ending node

max_path_lengthint, optional

The maximum length of a path to search on for PDS set, by default None, which sets it to 1000.

Returns:
pds_pathset

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.