pyphi.measures.distribution.intrinsic_specification#

pyphi.measures.distribution.intrinsic_specification(forward_repertoire, partitioned_forward_repertoire, selectivity_repertoire, state=None)#

Generalized intrinsic difference (GID) between two repertoires.

Pointwise, this is the selectivity repertoire weighting the pointwise mutual information between the unpartitioned (forward) and partitioned repertoires:

\[\text{gid}_i = s_i \, \log_2 \left( \frac{f_i}{f^{\text{part}}_i} \right)\]

where \(f\) is forward_repertoire, \(f^{\text{part}}\) is partitioned_forward_repertoire, and \(s\) is selectivity_repertoire. Terms where the ratio is undefined are set to zero (see pointwise_mutual_information_vector()). This is the default mechanism- and system-level φ measure, and is also registered under the name INTRINSIC_SPECIFICATION.

Parameters:
  • forward_repertoire (np.ndarray) – The unpartitioned repertoire.

  • partitioned_forward_repertoire (np.ndarray) – The repertoire under the partition.

  • selectivity_repertoire (np.ndarray) – The per-state weighting applied to the pointwise mutual information.

  • state (State or None) – If None, the full pointwise GID array is returned. Otherwise the single value at state is returned as a DistanceResult.

Returns:

np.ndarray or DistanceResult – The full pointwise GID array when state is None; otherwise the value at state with method="GENERALIZED_INTRINSIC_DIFFERENCE".

Return type:

Repertoire | float