graphical_models.classes.dags.dag.DAG.is_minimal_imap
- DAG.is_minimal_imap(other, certify=False, check_imap=True) Union[bool, Tuple[bool, Any]] [source]
Check if this DAG is a minimal IMAP of other, i.e., it is an IMAP and no proper subgraph of this DAG is an IMAP of other. Deleting the arc i->j retains IMAPness when i is d-separated from j in other given the parents of j besides i in this DAG.
- Parameters
other – Another DAG.
certify – If True and this DAG is not an IMAP of other, return a certificate of non-minimality in the form of an edge i->j that can be deleted while retaining IMAPness.
check_imap – If True, first check whether this DAG is an IMAP of other, if False, this DAG is assumed to be an IMAP of other.
See also
- Returns
True if
other
is a minimal 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_minimal_imap(other) False