causaldag.classes.dag.DAG.arcs_in_vstructures

DAG.arcs_in_vstructures() → Set[Tuple][source]

Get all arcs in the graph that participate in a v-structure.

Returns:Return all arcs in the graph in a v-structure (aka an immorality). A v-structure is formed when i->j<-k but there is no arc between i and k. Arcs that participate in a v-structure are identifiable from observational data.
Return type:Set[arc]

Example

>>> import causaldag as cd
>>> g = cd.DAG(arcs={(1, 3), (2, 3)})
>>> g.arcs_in_vstructures()
{(1, 3), (2, 3))