pyphi.measures.distribution.StatefulDistributionMeasureRegistry#

class pyphi.measures.distribution.StatefulDistributionMeasureRegistry[source]#

Bases: Registry

Storage for (p, q, state) -> float | DistanceResult measures.

Both distributions contribute to the result; the state selects an element. Used by IIT_4.0_SMALL_PHI variants and APMI.

register(name, asymmetric=False, supports_alphabet=<function _any_alphabet>)[source]#

Decorator for registering a StatefulDistributionMeasure.

Parameters:
  • name (str) – The name of the measure.

  • asymmetric (bool) – True if the measure is asymmetric. Stored as an attribute on the function.

  • supports_alphabet (Callable[[tuple[int, ...]], bool]) – Callable (alphabet_sizes) -> bool indicating whether the measure handles the given node cardinalities. Defaults to _any_alphabet.

Return type:

Callable[[Callable[[…], float]], Callable[[…], float]]