graphical_models.classes.dags.dag.DAG.is_invariant
- DAG.is_invariant(A, intervened_nodes, cond_set={}, verbose=False) bool [source]
Check if the distribution of
A
given cond_set is invariant to an intervention on intervened_nodes.if the “intervention node” I with intervened_nodes as its children is d-separated from A given C. Equivalently, the :math:`f^emptyset(A|C)
eq f^I(A|C)` if:
- there is an active path to an intervened node that ends in an arrowhead, and that intervened node
or one of its descendants is conditioned on.
- there is an active path to an intervened node that ends in a tail, and that intervened node
is not conditioned on.
- A:
Set of nodes.
- intervened_nodes:
Nodes on which an intervention has occurred.
- cond_set:
Conditioning set for the tested distribution.
- verbose:
If True, print moves of the algorithm.