pyphi.distribution.max_entropy_distribution#

pyphi.distribution.max_entropy_distribution(all_node_indices, purview, alphabet_sizes=None)[source]#

Return the maximum entropy distribution over a purview.

This differs from the substrate’s uniform distribution in that nodes outside purview are held fixed and treated as if they have only one state (a collapsed dimension).

Parameters:
  • all_node_indices (tuple[int]) – The node indices of the substrate.

  • purview (tuple[int]) – The indices of nodes the distribution is over.

  • alphabet_sizes (tuple[int, ...] or None, optional) – Per-node alphabet sizes indexed by node index. When None, all nodes are treated as binary.

Returns:

np.ndarray – The maximum entropy distribution, uniform over the states of the purview nodes. The array is cached and read-only.

Return type:

Repertoire