3.1.2. pywhy_graphs.algorithms.possible_ancestors#

pywhy_graphs.algorithms.possible_ancestors(G: PAG, source: int | float | str | Any) Set[int | float | str | Any][source]#

Possible ancestors of a source node.

Parameters:
GPAG

The graph.

sourceNode

The source node to start at.

Returns:
possible_ancestorsSet[Node]

The set of nodes that are possible ancestors.