# models¶

Containers for MICE, MIP, cut, partition, and concept data.

class pyphi.models.Cut

Represents a unidirectional cut.

severed

tuple(int – Connections from this group of nodes to those in intact are severed.

intact

tuple(int – Connections to this group of nodes from those in severed are severed.

json_dict()
class pyphi.models.Part

Represents one part of a bipartition.

mechanism

tuple(Node – The nodes in the mechanism for this part.

purview

tuple(Node – The nodes in the mechanism for this part.

Example

When calculating $$\varphi$$ of a 3-node subsystem, we partition the system in the following way:

mechanism:   A C        B
-----  X  -----
purview:    B        A C


This class represents one term in the above product.

json_dict()
class pyphi.models.Mip

A minimum information partition for $$\varphi$$ calculation.

MIPs may be compared with the built-in Python comparison operators (<, >, etc.). First, phi values are compared. Then, if these are equal up to constants.PRECISION, the size of the mechanism is compared (exclusion principle).

phi

float – This is the difference between the mechanism’s unpartitioned and partitioned repertoires.

direction

str – The temporal direction specifiying whether this MIP should be calculated with cause or effect repertoires.

mechanism

list(Node – The mechanism over which to evaluate the MIP.

purview

list(Node – The purview over which the unpartitioned repertoire differs the least from the partitioned repertoire.

partition

tuple(Part, Part – The partition that makes the least difference to the mechanism’s repertoire.

unpartitioned_repertoire

np.ndarray – The unpartitioned repertoire of the mechanism.

partitioned_repertoire

np.ndarray – The partitioned repertoire of the mechanism. This is the product of the repertoires of each part of the partition.

__bool__()

A Mip is truthy if it is not reducible; i.e. if it has a significant amount of $$\varphi$$.

json_dict()
class pyphi.models.Mice(mip, relevant_connections=None)

A maximally irreducible cause or effect (i.e., “core cause” or “core effect”).

relevant_connections (np.array):

An N x N matrix, where N is the number of nodes in this corresponding subsystem, that identifies connections that “matter” to this MICE.

direction == 'past':
relevant_connections[i,j] is 1 if node i is in the cause purview and node j is in the mechanism (and 0 otherwise).
direction == 'future':
relevant_connections[i,j] is 1 if node i is in the mechanism and node j is in the effect purview (and 0 otherwise).

MICEs may be compared with the built-in Python comparison operators (<, >, etc.). First, phi values are compared. Then, if these are equal up to constants.PRECISION, the size of the mechanism is compared (exclusion principle).

phi

float – The difference between the mechanism’s unpartitioned and partitioned repertoires.

direction

str – Either ‘past’ or ‘future’. If ‘past’ (‘future’), this represents a maximally irreducible cause (effect).

mechanism

list(Node) – The mechanism for which the MICE is evaluated.

purview

list(Node) – The purview over which this mechanism’s $$\varphi$$ is maximal.

repertoire

np.ndarray – The unpartitioned repertoire of the mechanism over the purview.

mip

Mip – The minimum information partition for this mechanism.

json_dict()
class pyphi.models.Concept(phi=None, mechanism=None, cause=None, effect=None, subsystem=None, normalized=False)

A star in concept-space.

The phi attribute is the $$\varphi^{\textrm{max}}$$ value. cause and effect are the MICE objects for the past and future, respectively.

Concepts may be compared with the built-in Python comparison operators (<, >, etc.). First, phi values are compared. Then, if these are equal up to constants.PRECISION, the size of the mechanism is compared.

phi

float – The size of the concept. This is the minimum of the $$\varphi$$ values of the concept’s core cause and core effect.

mechanism

tuple(Node – The mechanism that the concept consists of.

cause

|Mice| – The Mice representing the core cause of this concept.

effect

|Mice| – The Mice representing the core effect of this concept.

subsystem

Subsystem – This concept’s parent subsystem.

time

float – The number of seconds it took to calculate.

location

tuple(np.ndarray) – The concept’s location in concept space. The two elements of the tuple are the cause and effect repertoires.

__bool__()

A concept is truthy if it is not reducible; i.e. if it has a significant amount of $$\Phi$$.

eq_repertoires(other)

Return whether this concept has the same cause and effect repertoires as another.

Warning

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

emd_eq(other)

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

expand_cause_repertoire(new_purview=None)

Expands a cause repertoire to be a distribution over an entire network.

expand_effect_repertoire(new_purview=None)

Expands an effect repertoire to be a distribution over an entire network.

expand_partitioned_cause_repertoire()

Expands a partitioned cause repertoire to be a distribution over an entire network.

expand_partitioned_effect_repertoire()

Expands a partitioned effect repertoire to be a distribution over an entire network.

json_dict()
class pyphi.models.BigMip(phi=None, unpartitioned_constellation=None, partitioned_constellation=None, subsystem=None, cut_subsystem=None)

A minimum information partition for $$\Phi$$ calculation.

BigMIPs may be compared with the built-in Python comparison operators (<, >, etc.). First, phi values are compared. Then, if these are equal up to constants.PRECISION, the size of the mechanism is compared (exclusion principle).

phi

float – The $$\Phi$$ value for the subsystem when taken against this MIP, i.e. the difference between the unpartitioned constellation and this MIP’s partitioned constellation.

unpartitioned_constellation

tuple(Concept – The constellation of the whole subsystem.

partitioned_constellation

tuple(Concept – The constellation when the subsystem is cut.

subsystem

Subsystem – The subsystem this MIP was calculated for.

cut_subsystem

Subsystem – The subsystem with the minimal cut applied.

time

float – The number of seconds it took to calculate.

small_phi_time

float – The number of seconds it took to calculate the unpartitioned constellation.

cut

The unidirectional cut that makes the least difference to the subsystem.

__bool__()

A BigMip is truthy if it is not reducible; i.e. if it has a significant amount of $$\Phi$$.

json_dict()