causaldag.classes.dag.DAG.is_imap¶
-
DAG.
is_imap
(other) → bool[source]¶ Check if this DAG is an IMAP of the DAG
other
, i.e., all d-separation statements in this graph are also d-separation statements inother
.Parameters: other – Another DAG. See also
Returns: True if other
is an I-MAP of this DAG, otherwise False.Return type: bool Examples
>>> import causaldag as cd >>> g = cd.DAG(arcs={(1, 2), (3, 2)}) >>> other = cd.DAG(arcs={(1, 2)}) >>> g.is_imap(other) True >>> other = cd.DAG(arcs={(1, 2), (2, 3)}) >>> g.is_imap(other) False