compute.subsystem¶
Functions for computing subsystem-level properties.
- pyphi.compute.subsystem.ces(subsystem, mechanisms=None, purviews=None, cause_purviews=None, effect_purviews=None, directions=None, only_positive_phi=True, **kwargs)¶
Return the conceptual structure of this subsystem, optionally restricted to concepts with the mechanisms and purviews given in keyword arguments.
If you don’t need the full
CauseEffectStructure, restricting the possible mechanisms and purviews can make this function much faster.- Parameters:
subsystem (Subsystem) – The subsystem for which to determine the
CauseEffectStructure.- Keyword Arguments:
mechanisms (tuple[tuple[int]]) – Restrict possible mechanisms to those in this list.
purviews (tuple[tuple[int]]) – Same as in
concept().cause_purviews (tuple[tuple[int]]) – Same as in
concept().effect_purviews (tuple[tuple[int]]) – Same as in
concept().parallel (bool) – Whether to compute concepts in parallel. If
True, overridesconfig.PARALLEL_CONCEPT_EVALUATION.directions (Iterable[Direction]) – Restrict possible directions to these.
only_positive_phi (bool) – Whether to only return concepts with positive phi.
- Returns:
A tuple of every
Conceptin the cause-effect structure.- Return type:
- pyphi.compute.subsystem.conceptual_info(subsystem, **kwargs)¶
Return the conceptual information for a
Subsystem.This is the distance from the subsystem’s
CauseEffectStructureto the null concept.
- pyphi.compute.subsystem.evaluate_cut(cut, uncut_subsystem, unpartitioned_ces, **kwargs)¶
Compute the system irreducibility for a given cut.
- Parameters:
uncut_subsystem (Subsystem) – The subsystem without the cut applied.
cut (Cut) – The cut to evaluate.
unpartitioned_ces (CauseEffectStructure) – The cause-effect structure of the uncut subsystem.
- Returns:
The
SystemIrreducibilityAnalysisfor that cut.- Return type:
- pyphi.compute.subsystem.sia_partitions(nodes, node_labels=None)¶
Return all \(\Phi\) cuts for the given nodes.
Controlled by the
config.SYSTEM_PARTITION_TYPEoption.- Parameters:
nodes (tuple[int]) – The node indices to partition.
- Keyword Arguments:
node_labels (NodeLabels) – Enables printing the partition with labels.
- Returns:
All unidirectional partitions.
- Return type:
list[Cut]
- pyphi.compute.subsystem.sia(subsystem, **kwargs)¶
Return the minimal information partition of a subsystem.
- Parameters:
subsystem (Subsystem) – The candidate set of nodes.
- Returns:
A nested structure containing all the data from the intermediate calculations. The top level contains the basic irreducibility information for the given subsystem.
- Return type:
- pyphi.compute.subsystem.phi(subsystem)¶
Return the \(\Phi\) value of a subsystem.
- class pyphi.compute.subsystem.ConceptStyleSystem(subsystem, direction, cut=None)¶
A functional replacement for
Subsystemimplementing concept-style system cuts.- apply_cut(cut)¶
- __getattr__(name)¶
Pass attribute access through to the basic subsystem.
- property cause_system¶
- property effect_system¶
- concept(mechanism, purviews=False, cause_purviews=False, effect_purviews=False)¶
Compute a concept, using the appropriate system for each side of the cut.
- pyphi.compute.subsystem.concept_cuts(direction, node_indices, node_labels=None)¶
Generator over all concept-syle cuts for these nodes.
- pyphi.compute.subsystem.directional_sia(subsystem, direction, unpartitioned_ces=None, **kwargs)¶
Calculate a concept-style SystemIrreducibilityAnalysisCause or SystemIrreducibilityAnalysisEffect.
- class pyphi.compute.subsystem.SystemIrreducibilityAnalysisConceptStyle(sia_cause, sia_effect)¶
Represents a
SystemIrreducibilityAnalysiscomputed using concept-style system cuts.- property min_sia¶
- __getattr__(name)¶
Pass attribute access through to the minimal SIA.
- unorderable_unless_eq = ['network']¶
- 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.
- pyphi.compute.subsystem.sia_concept_style(subsystem)¶
Compute a concept-style SystemIrreducibilityAnalysis