pyphi.models.ces.CauseEffectStructure#

class pyphi.models.ces.CauseEffectStructure(sia, distinctions, relations, config=None, provenance=None)[source]#

Bases: HasProvenance, Displayable, Orderable, ToPandasMixin, Serializable

A Φ-structure: SIA + distinctions + relations.

System-level quantities are reached through the wrapped sia: the system integrated information value via ps.sia.phi, the system partition via ps.sia.partition, and the specified system state via ps.sia.system_state.

Parameters:
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:

float

property big_phi#

Φ, the sum of distinction and relation φ.

Type:

float

fold(distinctions)[source]#

Return the Φ-fold seeded by the given distinctions.

distinctions is an iterable of Distinction objects 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:

PhiFold

distinction_folds()[source]#

Yield the single-distinction Φ-fold of each distinction, in order.

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 recovers big_phi exactly.

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 the big_phi of 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.

distinctions is an iterable of Distinction objects 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:

InducedSubstructure

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 ValueError otherwise. The result is a view of self.

Parameters:

other (CauseEffectStructure)

Return type:

InducedSubstructure

relabel(mapping, node_labels=None)[source]#

Return this structure rewritten through the node-index bijection mapping. See pyphi.relabel.relabel_ces().

Return type:

CauseEffectStructure

diff(other)[source]#

Structured delta from this cause-effect structure to other.

Return type:

ResultDiff