graphical_models.classes.dags.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 in other.

Parameters

other – Another DAG.

See also

is_minimal_imap

Returns

True if other is an I-MAP of this DAG, otherwise False.

Return type

bool

Examples

>>> from graphical_models import DAG
>>> g = DAG(arcs={(1, 2), (3, 2)})
>>> other = DAG(arcs={(1, 2)})
>>> g.is_imap(other)
True
>>> other = DAG(arcs={(1, 2), (2, 3)})
>>> g.is_imap(other)
False