causaldag.classes.dag.DAG.resolved_sinks¶
-
DAG.
resolved_sinks
(other) → set[source]¶ Return the nodes in this graph which are “resolved sinks” with respect to the graph
other
.A “resolved sink” is a node which has the same parents in both graphs, and no children which are not themselves resolved sinks.
Parameters: other – TODO Examples
>>> import causaldag as cd >>> d1 = cd.DAG(arcs={(1, 0), (1, 2), (2, 0)}) >>> d2 = cd.DAG(arcs={(2, 0), (2, 1), (1, 0)}) >>> res_sinks = d1.resolved_sinks(d2) {0}