graphical_models.classes.dags.dag.DAG.interventional_cpdag
- DAG.interventional_cpdag(interventions: List[set], cpdag=None)[source]
Return the interventional essential graph (aka CPDAG) associated with this DAG.
- Parameters
interventions – A list of the intervention targets.
cpdag – The original (non-interventional) CPDAG of the graph. Faster when provided.
- Returns
Interventional CPDAG representing the I-MEC of this DAG.
- Return type
causaldag.PDAG
Examples
>>> from graphical_models import DAG >>> g = DAG(arcs={(1, 2), (2, 4), (3, 4)}) >>> cpdag = g.cpdag() >>> icpdag = g.interventional_cpdag([{1}], cpdag=cpdag) >>> icpdag.arcs {(1, 2), (2, 4), (3, 4)}