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).
- 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).
- 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
toTrue
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
- Yields
SystemIrreducibilityAnalysis – A
SystemIrreducibilityAnalysis
for eachSubsystem
of theNetwork
.
- 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
toTrue
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
- Yields
SystemIrreducibilityAnalysis – A
SystemIrreducibilityAnalysis
for eachSubsystem
of theNetwork
, excluding those with \(\Phi = 0\).
- pyphi.compute.network.major_complex(network, state)¶
Return the major complex of the network.
- Parameters
- Returns
The
SystemIrreducibilityAnalysis
for theSubsystem
with maximal \(\Phi\).- Return type
- pyphi.compute.network.condensed(network, state)¶
Return a list of maximal non-overlapping complexes.
- Parameters
- Returns
A list of
SystemIrreducibilityAnalysis
for non-overlapping complexes with maximal \(\Phi\) values.- Return type