pyphi.models.ces.CauseEffectStructure#
- class pyphi.models.ces.CauseEffectStructure(sia, distinctions, relations, config=None, provenance=None)[source]#
Bases:
HasProvenance,Displayable,Orderable,ToPandasMixin,SerializableA Φ-structure: SIA + distinctions + relations.
System-level quantities are reached through the wrapped
sia: the system integrated information value viaps.sia.phi, the system partition viaps.sia.partition, and the specified system state viaps.sia.system_state.- Parameters:
sia (Any)
distinctions (ResolvedDistinctions)
relations (Relations)
config (Any)
provenance (Any)
- property relation_closed: bool#
Whether every relation’s relata are members of
distinctions.True for complete structures and induced substructures; False for folds, whose incident relations may reference distinctions outside the seed set.
- order_by()[source]#
Return a list of values to compare for ordering.
The first value in the list has the greatest priority; if the first objects are equal the second object is compared, etc.
- Return type:
- fold(distinctions)[source]#
Return the Φ-fold seeded by the given distinctions.
distinctionsis an iterable ofDistinctionobjects or mechanism index-tuples drawn from this structure. The fold contains those distinctions and every relation incident to at least one of them.- Return type:
- distinction_importance()[source]#
Rank the distinctions by their additive contribution to Φ.
Each distinction’s importance is its single-distinction Φ-fold contribution: its own φ plus its share of each incident relation’s φ (
φ_r / |r|per bound seed). These contributions tile Φ — summing over all distinctions recoversbig_phiexactly.- Returns:
list[tuple[Distinction, float]] –
(distinction, contribution)pairs, sorted by descending contribution; ties are broken by mechanism for determinism. The removal cost of a distinction (everything its relations carry, not just its share) is thebig_phiof its fold:self.fold([distinction]).big_phi.
- induce(distinctions)[source]#
Return the induced substructure on the given distinctions: those distinctions plus exactly the relations whose relata are all among them.
distinctionsis an iterable ofDistinctionobjects or mechanism index-tuples drawn from this structure. Because a relation’s φ depends only on its relata, the induced relation set equals what computing relations over the subset from scratch would produce. The result is relation-closed (no dangling relata), so it can be displayed, aggregated, and projected as a self-contained object — but it is a view of this structure, not the cause-effect structure of any system.- Return type:
- meet(other)[source]#
The induced substructure on the distinctions common to both structures (value equality).
Because a relation’s φ depends only on its relata, the result’s relation set equals the intersection of the two structures’ relation sets. Requires both structures to be in the same frame; raises
ValueErrorotherwise. The result is a view ofself.- Parameters:
other (CauseEffectStructure)
- Return type:
- relabel(mapping, node_labels=None)[source]#
Return this structure rewritten through the node-index bijection
mapping. Seepyphi.relabel.relabel_ces().- Return type: