pyphi.models.distinction.Distinction#

class pyphi.models.distinction.Distinction(mechanism=None, cause=None, effect=None)[source]#

Bases: Displayable, OrderableByPhi, ToDictFromExplicitAttrsMixin, ToPandasMixin

The maximally irreducible cause and effect specified by a mechanism.

These can be compared with the built-in Python comparison operators (<, >, etc.). Comparison is by φ value (order_by()).

Variables:
  • mechanism (tuple[int]) – The mechanism that the distinction consists of.

  • cause (MaximallyIrreducibleCause) – The MIC representing the maximally-irreducible cause of this distinction.

  • effect (MaximallyIrreducibleEffect) – The MIE representing the maximally-irreducible effect of this distinction.

property effectively_tied: bool#

Whether any selection behind this distinction’s cause or effect (purview, mechanism partition, or specified state) is within config.numerics.precision of a tie.

property phi: float#

The size of the distinction.

This is the minimum of the φ values of the distinction’s MIC and MIE.

Type:

float

explain()[source]#

A typed account of why this distinction’s φ came out as it did: which direction (cause or effect) binds, plus that direction’s own findings.

Return type:

Explanation

diff(other)[source]#

Structured delta from this distinction to other (a.diff(b)).

A distinction carries no ConfigSnapshot, so config_diff is always empty.

Return type:

ResultDiff

property cause_purview#

The cause purview.

Type:

tuple[int]

property effect_purview#

The effect purview.

Type:

tuple[int]

property cause_purview_label#

The cause purview node labels, cased by the specified cause state (see pyphi.labels.NodeLabels.label_string()).

Type:

str

property effect_purview_label#

The effect purview node labels, cased by the specified effect state.

Type:

str

property cause_repertoire#

The cause repertoire.

Type:

np.ndarray

property effect_repertoire#

The effect repertoire.

Type:

np.ndarray

property mechanism_state#

The state of this mechanism.

Type:

tuple(int)

property mechanism_label[source]#

The labels of the mechanism nodes.

Type:

tuple[str]

purview(direction)[source]#

Return the purview in the given direction.

eq_repertoires(other)[source]#

Return whether this distinction has the same repertoires as another.

Warning

This only checks if the cause and effect repertoires are equal as arrays; mechanisms, purviews, or even the nodes that the mechanism and purview indices refer to, might be different.

emd_eq(other)[source]#

Return whether this distinction is equal to another in the context of an EMD calculation.