3.1.2. pywhy_graphs.algorithms.possible_ancestors#

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

Possible ancestors of a source node.

Parameters:

G : PAG

The graph.

source : Node

The source node to start at.

Returns:

possible_ancestors : Set[Node]

The set of nodes that are possible ancestors.