PDAG.cSeparation

PDAG.cSeparation(X, Y, Z=None)

Check if the sets of nodes X and Y are c-separated (by the set of nodes Z if given).

Parameters:
  • X (int or set[int]) – a node or a set of nodes

  • Y (int or set[int]) – a node or a set of nodes

  • Z (int or set[int], optional) – the observed node or nodes (none by default)

Returns:

True if X and Y are c-separated by Z

Return type:

bool

Warning

PDAG.cSeparation is deprecated after 3.3.2, use ChainGraph.cSeparation instead.

Example

import pyagrum as gum

pdag = gum.fastPDAG("A->B-C<-D")
# deprecated: use pyagrum.ChainGraph.cSeparation
pdag.cSeparation(0, 3)
# True
pdag.cSeparation(0, 3, {1, 2})
# False

Class

PDAG

Overridden in

ChainGraph.cSeparation