pyphi.cost.estimate_analysis#
- pyphi.cost.estimate_analysis(substrate, state=None, *, subset=None, compute=None, limit=1000000, scope=None)[source]#
Count the workload of a single-system analysis, without running it.
Drives the same enumeration machinery
pyphi.analyze()would use under the active configuration: the system partition scheme, the connectivity-pruned purview sets, and the mechanism partition scheme. No φ is computed and no state is needed — every counted quantity is state-independent.- Parameters:
substrate (Substrate) – The substrate to analyze.
state (optional) – Accepted so the call can mirror
analyze(substrate, state). The counts do not depend on it; it is only checked to have one entry per unit.subset (optional) – Node indices (or labels) of the candidate system;
Noneuses the whole substrate.compute (str or None, optional) –
Noneestimates the full analysis;"sia"only the system-partition axis;"distinctions"only the distinction axis;"ces"the distinction axis plus the system-partition axis, since unfolding a cause-effect structure computes a system irreducibility analysis first.limit (int, optional) – Work budget for the counting walk itself: purview evaluations and fresh partition enumerations each cost one unit, while memoized partition counts are free. A walk that exceeds the budget stops immediately and reports
capped=True.scope (
CESScope, optional) – Restrict the counted mechanisms and purviews to the scope’s feasibility surface. Affects only the distinction axis; the system-partition count and the structural ceilings (possible_distinctions,possible_relations) are properties of the full system.
- Returns:
AnalysisEstimate – The counted workload.
- Raises:
ValueError – If
computeis not"sia","ces","distinctions", orNone, or ifstatedoes not have one entry per unit.- Return type:
Examples
>>> from pyphi import examples >>> est = estimate_analysis(examples.basic_substrate()) >>> est.mechanisms 7 >>> est.system_partitions 22