compute.subsystem

Functions for computing subsystem-level properties.

class pyphi.compute.subsystem.ComputeCauseEffectStructure(iterable, *context)

Engine for computing a CauseEffectStructure.

description = 'Computing concepts'
subsystem
empty_result(*args)

Return the default result with which to begin the computation.

static compute(mechanism, subsystem, purviews, cause_purviews, effect_purviews)

Compute a Concept for a mechanism, in this Subsystem with the provided purviews.

process_result(new_concept, concepts)

Save all concepts with non-zero \(\varphi\) to the CauseEffectStructure.

pyphi.compute.subsystem.ces(subsystem, mechanisms=False, purviews=False, cause_purviews=False, effect_purviews=False, parallel=False)

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, overrides config.PARALLEL_CONCEPT_EVALUATION.
Returns:

A tuple of every Concept in the cause-effect structure.

Return type:

CauseEffectStructure

pyphi.compute.subsystem.conceptual_info(subsystem)

Return the conceptual information for a Subsystem.

This is the distance from the subsystem’s CauseEffectStructure to the null concept.

pyphi.compute.subsystem.evaluate_cut(uncut_subsystem, cut, unpartitioned_ces)

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 SystemIrreducibilityAnalysis for that cut.

Return type:

SystemIrreducibilityAnalysis

class pyphi.compute.subsystem.ComputeSystemIrreducibility(iterable, *context)

Computation engine for system-level irreducibility.

description = 'Evaluating Φ cuts'
empty_result(subsystem, unpartitioned_ces)

Begin with a SystemIrreducibilityAnalysis with infinite \(\Phi\); all actual SIAs will have less.

static compute(cut, subsystem, unpartitioned_ces)

Evaluate a cut.

process_result(new_sia, min_sia)

Check if the new SIA has smaller \(\Phi\) than the standing result.

pyphi.compute.subsystem.sia_bipartitions(nodes, node_labels=None)

Return all \(\Phi\) cuts for the given nodes.

This value changes based on config.CUT_ONE_APPROXIMATION.

Parameters:nodes (tuple[int]) – The node indices to partition.
Returns:All unidirectional partitions.
Return type:list[Cut]
pyphi.compute.subsystem.sia(cache_key, subsystem)

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:SystemIrreducibilityAnalysis
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 Subsystem implementing concept-style system cuts.

apply_cut(cut)
__getattr__(name)

Pass attribute access through to the basic subsystem.

cause_system
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)

Calculate a concept-style SystemIrreducibilityAnalysisCause or SystemIrreducibilityAnalysisEffect.

class pyphi.compute.subsystem.SystemIrreducibilityAnalysisConceptStyle(sia_cause, sia_effect)

Represents a SystemIrreducibilityAnalysis computed using concept-style system cuts.

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