compute.network

Functions for computing network-level properties.

pyphi.compute.network.subsystems(network, state)

Return a generator of all possible subsystems of a network.

Note

Does not return subsystems that are in an impossible state (after conditioning the subsystem TPM on the state of the other nodes).

Parameters
  • network (Network) – The Network of interest.

  • state (tuple[int]) – The state of the network (a binary tuple).

Yields

Subsystem – A Subsystem for each subset of nodes in the network, excluding subsystems that would be in an impossible state.

pyphi.compute.network.possible_complexes(network, state)

Return a generator of subsystems of a network that could be a complex.

This is the just powerset of the nodes that have at least one input and output (nodes with no inputs or no outputs cannot be part of a main complex, because they do not have a causal link with the rest of the subsystem in the previous or next timestep, respectively).

Note

Does not return subsystems that are in an impossible state (after conditioning the subsystem TPM on the state of the other nodes).

Parameters
  • network (Network) – The Network of interest.

  • state (tuple[int]) – The state of the network (a binary tuple).

Yields

Subsystem – The next subsystem that could be a complex.

class pyphi.compute.network.FindAllComplexes(iterable, *context)

Computation engine for finding all complexes.

description = 'Finding complexes'
empty_result()

Return the default result with which to begin the computation.

static compute(subsystem)

Map over a single object from self.iterable.

process_result(new_sia, sias)

Reduce handler.

Every time a new result is generated by compute, this method is called with the result and the previous (accumulated) result. This method compares or collates these two values, returning the new result.

Setting self.done to True in this method will abort the remainder of the computation, returning this final result.

pyphi.compute.network.all_complexes(network, state)

Return a generator for all complexes of the network.

Note

Includes reducible, zero-\(\Phi\) complexes (which are not, strictly speaking, complexes at all).

Parameters
  • network (Network) – The Network of interest.

  • state (tuple[int]) – The state of the network (a binary tuple).

Yields

SystemIrreducibilityAnalysis – A SystemIrreducibilityAnalysis for each Subsystem of the Network.

class pyphi.compute.network.FindIrreducibleComplexes(iterable, *context)

Computation engine for finding irreducible complexes of a network.

process_result(new_sia, sias)

Reduce handler.

Every time a new result is generated by compute, this method is called with the result and the previous (accumulated) result. This method compares or collates these two values, returning the new result.

Setting self.done to True in this method will abort the remainder of the computation, returning this final result.

pyphi.compute.network.complexes(network, state)

Return all irreducible complexes of the network.

Parameters
  • network (Network) – The Network of interest.

  • state (tuple[int]) – The state of the network (a binary tuple).

Yields

SystemIrreducibilityAnalysis – A SystemIrreducibilityAnalysis for each Subsystem of the Network, excluding those with \(\Phi = 0\).

pyphi.compute.network.major_complex(network, state)

Return the major complex of the network.

Parameters
  • network (Network) – The Network of interest.

  • state (tuple[int]) – The state of the network (a binary tuple).

Returns

The SystemIrreducibilityAnalysis for the Subsystem with maximal \(\Phi\).

Return type

SystemIrreducibilityAnalysis

pyphi.compute.network.condensed(network, state)

Return a list of maximal non-overlapping complexes.

Parameters
  • network (Network) – The Network of interest.

  • state (tuple[int]) – The state of the network (a binary tuple).

Returns

A list of SystemIrreducibilityAnalysis for non-overlapping complexes with maximal \(\Phi\) values.

Return type

list[SystemIrreducibilityAnalysis]