models.concept
¶
-
class
pyphi.models.concept.
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 toconstants.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 – Either
DIRECTIONS[PAST]
orDIRECTIONS[FUTURE]
. The temporal direction specifiying whether this MIP should be calculated with cause or effect repertoires.
-
mechanism
¶ tuple(int – The mechanism over which to evaluate the MIP.
-
purview
¶ tuple(int – 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.
(That is, if it has a significant amount of \(\varphi\).)
-
to_json
()¶
-
-
class
pyphi.models.concept.
Mice
(mip)¶ A maximally irreducible cause or effect (i.e., “core cause” or “core effect”).
MICEs may be compared with the built-in Python comparison operators (
<
,>
, etc.). First,phi
values are compared. Then, if these are equal up toconstants.PRECISION
, the size of the mechanism is compared (exclusion principle).-
phi
¶ float
– The difference between the mechanism’s unpartitioned and partitioned repertoires.
-
direction
¶ str
– EitherDIRECTIONS[PAST]
orDIRECTIONS[FUTURE]
. IfDIRECTIONS[PAST]
(DIRECTIONS[FUTURE]
), this represents a maximally irreducible cause (effect).
-
mechanism
¶ list(int)
– The mechanism for which the MICE is evaluated.
-
purview
¶ list(int)
– 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.
-
to_json
()¶
-
-
class
pyphi.models.concept.
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
andeffect
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 toconstants.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(int – The mechanism that the concept consists of.
-
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.
(That is, 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)¶ Expand a cause repertoire into a distribution over an entire network.
-
expand_effect_repertoire
(new_purview=None)¶ Expand an effect repertoire into a distribution over an entire network.
-
expand_partitioned_cause_repertoire
()¶ Expand a partitioned cause repertoire into a distribution over an entire network.
-
expand_partitioned_effect_repertoire
()¶ Expand a partitioned effect repertoire into a distribution over an entire network.
-
to_json
()¶
-
-
class
pyphi.models.concept.
Constellation
¶ A constellation of concepts.
This is a wrapper around a tuple to provide a nice string representation and place to put constellation methods. Previously, constellations were represented as
tuple(|Concept|)
; this usage still works in all functions.-
to_json
()¶
-
-
pyphi.models.concept.
normalize_constellation
(constellation)¶ Deterministically reorder the concepts in a constellation.
Parameters: constellation (Constellation) – The constellation in question. - Returns
- Constellation: The constellation, ordered lexicographically by
- mechanism.