beta_to_alpha#

fedcausal.fusion.beta_to_alpha(dag, order)[source]#

Return dag re-expressed as a minimal I-map whose arcs all follow order.

Nodes are bubbled into order by adjacent swaps; a swap across an arc reverses it and adds the moral edges that keep every conditional independence of dag, so the result implies no independence dag does not.

Parameters:
dagDAG

Not modified.

ordersequence of int

The target topological order, e.g. from alpha_order().

Returns:
DAG