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}}\) ispartitioned_forward_repertoire, and \(s\) isselectivity_repertoire. Terms where the ratio is undefined are set to zero (seepointwise_mutual_information_vector()). This is the default mechanism- and system-level φ measure, and is also registered under the nameINTRINSIC_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 atstateis returned as aDistanceResult.
- Returns:
np.ndarray or DistanceResult – The full pointwise GID array when
stateisNone; otherwise the value atstatewithmethod="GENERALIZED_INTRINSIC_DIFFERENCE".- Return type:
Repertoire | float