pyphi.system.System#
- class pyphi.system.System(substrate, state, node_indices=None, partition=None, external_indices=None, background_conditioning=None, background_state=None)[source]#
Bases:
Displayable,ToPandasMixin,SerializableA substrate evaluated in a specific state over a node subset, with partition.
The
external_indicesfield specifies which substrate units are the background when computing repertoires. WhenNone(the default), it resolves in__post_init__tosubstrate - node_indices, the background units W = U S, which under the default convention are causally marginalized conditional on the current state (Albantakis et al. 2023, Eqs. 3-4). An explicit override (used byTransitionSystemfor actual-causation analysis) may overlap withnode_indices.The
background_conditioningfield pins this System to one cause-side background convention.None(the default) resolvesconfig.formalism.iit.background_conditioningat compute time.The
background_statefield supplies the state at which external units are conditioned, when that differs fromstate.None(the default) conditions them atstate. Used byTransitionSystemfor actual causation, where the cause direction evaluates mechanisms against the observed after-state while the background is fixed at the observed before-state.- Parameters:
- apply_cut(partition)[source]#
Return a new System with the given partition applied.
substrate,state, andnode_indicesare unchanged. The cause/effect marginals depend only on those inputs — the cut enters downstream through the cut connectivity matrix when node TPMs marginalize out severed inputs — so the marginals are materialized on this instance and shared with the new one rather than re-derived.- Parameters:
partition (DirectedBipartition)
- Return type:
- classmethod from_substrate(substrate, state, nodes=None, partition=None, **kwargs)[source]#
Construct a System from a substrate, state, and optional node subset.
- to_networkx(connectivity='inferred')[source]#
Return the substrate’s
networkx.DiGraphwith node attributes.Each node carries
stateandin_system. Edges default to the TPM-inferred causal connectivity (connectivity="declared"for the declaredcm).
- property cause_marginal: CauseMarginals#
Per-system-unit cause factors under the active background convention: the marginalization of Albantakis et al. (2023), Eq. 4, or the background conditioned at its observed state (
CONDITION_CURRENT_STATE).
- property effect_marginal: FactoredTPM[source]#
Forward TPM conditioned on the external units at their observed state.
- property proper_effect_marginal: FactoredTPM[source]#
Effect TPM restricted to system units.
Per system unit
iinnode_indices, the returned FactoredTPM carries the forward factor ofeffect_marginal— the external units (external_indices) conditioned at the background reference state — with all non-system input dims dropped, so the returned shape is(*system_alphabet, k_i)per system output unit. Substrate units neither in the system nor external are marginalized uniformly (the noise-background convention). The effect-side dual ofproper_cause_marginal.
- property proper_cause_marginal: FactoredTPM#
Cause TPM restricted to system units.
Per system unit
iinnode_indices, the returned FactoredTPM carries the cause factor ofcause_marginal— background handled per the active convention (the marginalization of Albantakis et al. (2023), Eq. 4, or the external units conditioned at the background reference state) — with all non-system input dims dropped, so the returned shape is(*system_alphabet, k_i)per system output unit. Substrate units neither in the system nor external are marginalized uniformly (the noise-background convention).
- sia(**kwargs)[source]#
Return the system irreducibility analysis of this system.
Resolves the system- and specification-level measures from config at the public boundary and threads them to the active formalism explicitly, so formalism methods are never called without explicit measures in normal flow.
A
system_statekeyword, when given, must be the state specification the analysis would itself compute (it is derived deterministically from the system and configuration). Calls with a caller-suppliedsystem_statebypass the disk result cache: nothing verifies the supplied state is the canonical one, so sharing the cache entry would let a non-canonical state poison (and be served by) the plainsia()result.
- ces(**kwargs)[source]#
Return the cause-effect structure of this system (Eq. 57).
The result is a
CauseEffectStructure: the distinctions plus their relations.Notes
For results computed under an earlier version of IIT (see Reproduce results from earlier versions of IIT): IIT 3.0 has no relations, so under it the CES is exactly the set of distinctions, returned as a
ResolvedDistinctionswith the concepts as.concepts.
- distinctions(congruent=False, **kwargs)[source]#
Return the
Distinctionsof this system.The set of irreducible cause-effect distinctions specified by mechanisms in the system, without the relations that bind them.
- Parameters:
congruent (bool) – Filter to the distinctions congruent with the system’s specified state, as the cause-effect structure does, but without the system-partition search. The result is a
ResolvedDistinctionsequal toces().distinctionswhen the specified state is untied, and the unfilteredUnresolvedDistinctionswhen it ties (seecongruent_distinctions()).kwargs (Any)
- Return type:
Notes
Congruence filtering can remove every distinction — a system whose mechanisms specify states incongruent with the system’s own has a nonempty unfiltered set and an empty cause-effect structure. The unfiltered count and Σφ_d are therefore upper bounds, not estimates.
For results computed under an earlier version of IIT (see Reproduce results from earlier versions of IIT): IIT 3.0 has no tied specified states, so its distinctions are congruent as computed.
- find_mip(direction, mechanism, purview, **kwargs)[source]#
Return the minimum partition for a mechanism over a purview.
Resolves mechanism- and specification-level measures from config at the public boundary so the active formalism’s MIP search is never called without explicit measures in normal flow. Explicit
mechanism_measure/specification_measurekwargs override.