models.mechanism
¶
Mechanism-level objects.
-
class
pyphi.models.mechanism.
RepertoireIrreducibilityAnalysis
(phi, direction, mechanism, purview, partition, repertoire, partitioned_repertoire, node_labels=None)¶ An analysis of the irreducibility (\(\varphi\)) of a mechanism over a purview, for a given partition, in one temporal direction.
These can be compared with the built-in Python comparison operators (
<
,>
, etc.). First, \(\varphi\) values are compared. Then, if these are equal up toPRECISION
, the size of the mechanism is compared (see thePICK_SMALLEST_PURVIEW
option inconfig
.)-
property
phi
¶ float: This is the difference between the mechanism’s unpartitioned and partitioned repertoires.
-
property
mechanism
¶ tuple[int]: The mechanism that was analyzed.
-
property
purview
¶ tuple[int]: The purview over which the the mechanism was analyzed.
-
property
partition
¶ KPartition: The partition of the mechanism-purview pair that was analyzed.
-
property
repertoire
¶ np.ndarray: The repertoire of the mechanism over the purview.
-
property
partitioned_repertoire
¶ np.ndarray: The partitioned repertoire of the mechanism over the purview. This is the product of the repertoires of each part of the partition.
-
property
node_labels
¶ NodeLabels
for this system.
-
unorderable_unless_eq
= ['direction']¶
-
order_by
()¶ 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.
-
__bool__
()¶ A
RepertoireIrreducibilityAnalysis
isTrue
if it has \(\varphi > 0\).
-
to_json
()¶
-
property
-
class
pyphi.models.mechanism.
MaximallyIrreducibleCauseOrEffect
(ria)¶ A maximally irreducible cause or effect (MICE).
These can be compared with the built-in Python comparison operators (
<
,>
, etc.). First, \(\varphi\) values are compared. Then, if these are equal up toPRECISION
, the size of the mechanism is compared (see thePICK_SMALLEST_PURVIEW
option inconfig
.)-
property
phi
¶ float: The difference between the mechanism’s unpartitioned and partitioned repertoires.
-
property
mechanism
¶ list[int]: The mechanism for which the MICE is evaluated.
-
property
purview
¶ list[int]: The purview over which this mechanism’s \(\varphi\) is maximal.
-
property
mip
¶ KPartition: The partition that makes the least difference to the mechanism’s repertoire.
-
property
repertoire
¶ np.ndarray: The unpartitioned repertoire of the mechanism over the purview.
-
property
partitioned_repertoire
¶ np.ndarray: The partitioned repertoire of the mechanism over the purview.
-
property
ria
¶ RepertoireIrreducibilityAnalysis: The irreducibility analysis for this mechanism.
-
unorderable_unless_eq
= ['direction']¶
-
order_by
()¶ 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.
-
to_json
()¶
-
damaged_by_cut
(subsystem)¶ Return
True
if this MICE is affected by the subsystem’s cut.The cut affects the MICE if it either splits the MICE’s mechanism or splits the connections between the purview and mechanism.
-
property
-
class
pyphi.models.mechanism.
MaximallyIrreducibleCause
(ria)¶ A maximally irreducible cause (MIC).
These can be compared with the built-in Python comparison operators (
<
,>
, etc.). First, \(\varphi\) values are compared. Then, if these are equal up toPRECISION
, the size of the mechanism is compared (see thePICK_SMALLEST_PURVIEW
option inconfig
.)
-
class
pyphi.models.mechanism.
MaximallyIrreducibleEffect
(ria)¶ A maximally irreducible effect (MIE).
These can be compared with the built-in Python comparison operators (
<
,>
, etc.). First, \(\varphi\) values are compared. Then, if these are equal up toPRECISION
, the size of the mechanism is compared (see thePICK_SMALLEST_PURVIEW
option inconfig
.)
-
class
pyphi.models.mechanism.
Concept
(mechanism=None, cause=None, effect=None, subsystem=None, time=None)¶ The maximally irreducible cause and effect specified by a mechanism.
These can be compared with the built-in Python comparison operators (
<
,>
, etc.). First, \(\varphi\) values are compared. Then, if these are equal up toPRECISION
, the size of the mechanism is compared.-
mechanism
¶ The mechanism that the concept consists of.
- Type
tuple[int]
-
cause
¶ The
MaximallyIrreducibleCause
representing the maximally-irreducible cause of this concept.
-
effect
¶ The
MaximallyIrreducibleEffect
representing the maximally-irreducible effect of this concept.
-
time
¶ The number of seconds it took to calculate.
- Type
float
-
property
phi
¶ float: The size of the concept.
This is the minimum of the \(\varphi\) values of the concept’s
MaximallyIrreducibleCause
andMaximallyIrreducibleEffect
.
-
property
cause_purview
¶ tuple[int]: The cause purview.
-
property
effect_purview
¶ tuple[int]: The effect purview.
-
property
cause_repertoire
¶ np.ndarray: The cause repertoire.
-
property
effect_repertoire
¶ np.ndarray: The effect repertoire.
-
property
mechanism_state
¶ tuple(int): The state of this mechanism.
-
unorderable_unless_eq
= ['subsystem']¶
-
order_by
()¶ 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.
-
__bool__
()¶ A concept is
True
if \(\varphi > 0\).
-
eq_repertoires
(other)¶ Return whether this concept 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)¶ Return whether this concept is equal to another in the context of an EMD calculation.
-
expand_cause_repertoire
(new_purview=None)¶ See
expand_repertoire()
.
-
expand_effect_repertoire
(new_purview=None)¶ See
expand_repertoire()
.
-
expand_partitioned_cause_repertoire
()¶ See
expand_repertoire()
.
-
expand_partitioned_effect_repertoire
()¶ See
expand_repertoire()
.
-
to_json
()¶ Return a JSON-serializable representation.
-
classmethod
from_json
(dct)¶
-