graphical_models.classes.dags.dag.DAG.reversible_arcs

DAG.reversible_arcs() Set[Tuple[Hashable, Hashable]][source]

Get all reversible (aka covered) arcs in the DAG.

Returns

Return all reversible (aka covered) arcs in the DAG. An arc i -> j is covered if the Pa(j) = Pa(i) \cup {i}. Reversing a reversible arc results in a DAG in the same Markov equivalence class.

Return type

Set[arc]

Example

>>> from graphical_models import DAG
>>> g = DAG(arcs={(1, 2), (1, 3), (2, 3)})
>>> g.reversible_arcs()
{(1, 2), (2, 3)}