3.3.2. pywhy_graphs.algorithms.pds_t_path#

pywhy_graphs.algorithms.pds_t_path(graph: StationaryTimeSeriesPAG, node_x: Tuple[int | float | str | Any, int], node_y: Tuple[int | float | str | Any, int], max_path_length: int | None = None) Set[source]#

Compute the possibly-d-separating path set over time.

Returns the ‘pdst_path’ set defined in [1] with the additional restriction that any nodes must be on a path between the two endpoints.

Parameters:
graphStationaryTimeSeriesPAG

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_t_setset

The set of nodes in the possibly d-separating path set.

Notes

This is a smaller subset compared to possibly-d-separating sets.

This consists of nodes, ‘x’, in the PDS set of (node_x, node_y), with the time-lag of ‘x’ being less than the max time-lag among node_x and and node_y.

The current implementation calls pds and then restricts the nodes that it returns.