causaldag.classes.ancestral_graph.AncestralGraph.ancestors_of

AncestralGraph.ancestors_of(nodes: Union[Hashable, Set[Hashable]], exclude_arcs={}) → Set[Hashable][source]

Return the ancestors of the node or set of nodes nodes.

Parameters:
  • nodes – Set of nodes.
  • exclude_arcs – TODO

See also

descendants_of()

Returns:Return all nodes j such that there is a directed path from j to node.
Return type:Set[node]

Example

TODO