pyphi.actual.TransitionSystem#
- class pyphi.actual.TransitionSystem(substrate, before_state, after_state, cause_indices, effect_indices, direction, partition=None, noise_background=False)[source]#
Bases:
SerializableA directional view of a state transition.
Implements
pyphi.protocols.SystemPublicInterfaceby holding an underlyingpyphi.system.System(via_underlying_system) and delegating the protocol surface through__getattr__(). The underlying System is constructed withexternal_indices = substrate.indices - cause_indices(or()whennoise_backgroundis True), so substrate units outside the cause set are fixed in their actual state as background conditions (Albantakis et al. 2019, Section 3.3, “Distinct Background Conditions”): their inputs to the transition are clamped at the observed before-state in both directions, matching the paper’s causal model in which the background U is set to u throughout the transition. Withnoise_backgroundthe background inputs are instead marginalized uniformly.The mechanism-evaluation
stateis direction-aware:after_statefor the CAUSE direction (Bayesian-inverting from the observed effect) andbefore_statefor the EFFECT direction (forward conditioning on the observed cause). TwoTransitionSysteminstances live inside eachTransition, one per direction.The underlying System is pinned to
background_conditioning = "CONDITION_CURRENT_STATE"withbackground_state = before_state, so the background units are held at their before-state values in both directions. Actual causation’s background rule isActualCausationConfig.background_scheme, not the IIT-formalismbackground_conditioningoption, so the pin keeps AC results identical regardless of that option’s value.The shared System surface delegated to the underlying System is the explicit allow-list
_DELEGATED_TO_SYSTEM; everything else is handled locally or unsupported.- Parameters:
- property background_state: tuple[int, ...][source]#
External units are conditioned at the observed before-state.
- partitioned_repertoire(direction, partition, *, partitioned_repertoire_scheme, **kw)[source]#
Compute the partitioned repertoire under the actual-causation scheme.
The partitioned repertoire is the product of the per-part repertoires (Albantakis et al. 2019, Eq. 8 for the effect direction and Eq. 10 for the cause direction), dispatched through the
partitioned_repertoire_schemeregistry. This differs frompyphi.system.System.partitioned_repertoire(), which applies a mechanism distance measure for IIT.