MeekRules.propagateToDAG

MeekRules.propagateToDAG(*args)

Calls propagateToCPDAG and then orients the remaining edges: into a consistent extension if the propagated graph has one, else with new v-structures. The orientation looks for small CPTs: with domainSizes, it uses the domain size of each node; without, all the domains are considered equal (nodes with few parents). The DAG contains all the arcs of the propagated graph. pyagrum.MeekRules.choices returns the list of the arbitrary choices made by the last execution of pyagrum.MeekRules.propagateToDAG.

Parameters:
  • mg (pyagrum.MixedGraph or pyagrum.PDAG) – The graph to be completed.

  • domainSizes (dict[int, int], optional) – The domain size of each node of mg (node id -> domain size).

Returns:

The completed pyagrum.DAG.

Return type:

pyagrum.DAG

Raises:

Example

import pyagrum as gum

mr = gum.MeekRules()
dag = mr.propagateToDAG(gum.fastMixedGraph("A->B-C-D"))
type(dag).__name__, sorted(dag.arcs())
# ('DAG', [(0, 1), (1, 2), (2, 3)])

Class

MeekRules