pyphi.estimate.estimate_substrate#
- pyphi.estimate.estimate_substrate(data, *, regime, prior=0.5, node_labels=None, model='counts')[source]#
Estimate a posterior over substrates from binary transition data.
- Parameters:
data (ndarray[tuple[Any, ...], dtype[integer]] | tuple[ndarray[tuple[Any, ...], dtype[integer]], ndarray[tuple[Any, ...], dtype[integer]]]) – Either a pair
(current, next)of integer arrays, each of shape(T, n)with one transition per row (the natural form for perturbational trials), or a single integer array of shape(T, n)— a trajectory whose transitions are the consecutive row pairs (the natural form for observational recordings). Both forms are accepted under both regimes; values must be 0/1.regime (str) – Required assertion about how the data was produced:
"perturbational"(current states set by intervention) or"observational"(passively recorded trajectory; see the module docstring for the identifiability caveat).prior (float) – Symmetric Beta prior pseudocount added to every TPM cell (default Jeffreys,
1/2). Must be positive.node_labels (Sequence[str] | None) – Optional labels for the substrate units.
model (str) – Estimation model; only
"counts"is implemented.
- Returns:
A
SubstratePosteriorwith independent Beta posteriors overevery TPM cell and a
CoverageReport.
- Return type: