causal_networkx.graphs.dag.DAG.markov_blanket_of#

DAG.markov_blanket_of(node)[source]#

Compute the markov blanket of a node.

When computing the Markov blanket for an ADMG, we can use the definition presented in [1], where the Markov blanket is a subset, S of variables in the graph, where a subset, S' is called a Markov blanket if it satisfies the condition:

\[X \perp S | S'\]
Parameters:

node : node

The node to compute Markov blanket for.

Returns:

markov_blanket : set

A set of parents, children and spouses of the node.

References

Return type:

Set