pyphi.graph.substrate_to_dbn#

pyphi.graph.substrate_to_dbn(substrate)[source]#

Return the substrate’s 2-timeslice DBN as a networkx.DiGraph.

Each node label X becomes two variables, (X, 0) at time t and (X, 1) at t+1. The only edges are inter-slice (parent, 0) -> (child, 1) over the node’s inferred parents, so the graph is acyclic even when the substrate is cyclic. Each (X, 1) node carries cpd (the CPD ndarray) and parents (ordered parent labels); every node carries time. Requires the visualize extra (networkx).

Parameters:

substrate (Substrate)

Return type:

networkx.DiGraph