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
Xbecomes two variables,(X, 0)at timetand(X, 1)att+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 carriescpd(the CPD ndarray) andparents(ordered parent labels); every node carriestime. Requires thevisualizeextra (networkx).- Parameters:
substrate (Substrate)
- Return type:
networkx.DiGraph