CPDAG.consistentExtension

CPDAG.consistentExtension()
Returns:

a represented DAG (a consistent extension: same skeleton, same v-structures, containing the arcs), kept from the construction of the graph

Return type:

pyagrum.DAG

See also

pyagrum.graph.consistentExtension

the same for a PDAG, a CPDAG or an MPDAG

Example

import pyagrum as gum

cpdag = gum.CPDAG.fromDAG(gum.fastDAG("A->B->C;D->C"))
dag = cpdag.consistentExtension()
cpdag.contains(dag), dag.sizeArcs()
# (True, 3)

Used by

CPDAG, EssentialGraph

Inheritance diagram of pyagrum.CPDAG, pyagrum.EssentialGraph