pyphi.models.distinctions.Distinctions#
- class pyphi.models.distinctions.Distinctions(distinctions=())[source]#
Bases:
Displayable,Orderable,Sequence,ToPandasMixin,SerializableBase class for a collection of distinctions.
Holds the read-only operations shared by
UnresolvedDistinctionsandResolvedDistinctions. Instantiable directly for the rare cases where the resolution status is genuinely unknown (e.g. deserializing a stored fixture); construct one of the marker subtypes instead so that passing the result to a function requiring a specific resolution status is checked at the type level.- Parameters:
distinctions (Iterable)
- filter(predicate)[source]#
Return the distinctions satisfying
predicate.Preserves the runtime subtype, so filtering a
ResolvedDistinctionsyields aResolvedDistinctions.- Return type:
- 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.
- property flat#
An iterator over causes and effects (one
MICEper direction per concept), for callers that want to operate at the MICE level rather than the concept level.
- property labeled_mechanisms#
The labeled mechanism of each concept.
- purview_inclusion(max_order=None)[source]#
Return a mapping:
- {order: {frozenset[Unit]: {distinctions whose cause/effect purview
union includes those Units}}}
- resolve_congruence(system_state)[source]#
Resolve each distinction’s tied readings against
system_state, per the Albantakis et al. 2023 S1 Text.Congruence with the system’s specified cause-effect state is a requirement: non-congruent readings are dropped, and a distinction with no congruent reading in either direction is excluded from the structure. Ties among congruent readings are resolved jointly across distinctions by the Composition appeal — selecting the combination of readings that maximizes the structure integrated information Φ (Σφ_d is invariant across readings, so the comparison is over the analytical Σφ_r) — with residual Φ-ties closed by the Determinism convention (lexicographic purviews and states). Beyond
_JOINT_READING_BOUNDcombinations, a greedy per-distinction pass approximates the joint maximum and aPyPhiWarningis emitted.Returns a
ResolvedDistinctionsregardless of the input subtype — calling on an already-resolved bag is well-defined and just refilters.- Parameters:
system_state (SystemStateSpecification)
- Return type: