pyphi.formalism.base#

Protocols and registry for phi formalisms.

A formalism is a strategy for computing integrated information. Each formalism bundles a partition scheme, the distance measures it accepts, and algorithms that combine them into mechanism-level RIAs, system-level SIAs, and Φ-structures.

This module declares the abstract Protocol shape and the global registry. Concrete implementations live in pyphi.formalism.iit3 and pyphi.formalism.iit4.

Module attributes

FORMALISM_REGISTRY

Global registry of phi formalisms.

ACTUAL_CAUSATION_FORMALISM_REGISTRY

Global registry of actual-causation formalisms.

Functions

check_background_conditioning_compatible(...)

Raise ConfigurationError if the cause-side background-conditioning convention is one formalism does not define.

check_measure_compatible(formalism, measure, *)

Raise MeasureNotCompatibleError if measure isn't accepted by formalism.

check_mechanism_partition_scheme_compatible(...)

Raise ConfigurationError if a mechanism partition scheme is one formalism does not accept.

check_sia_tie_strategy_compatible(formalism, ...)

Raise ConfigurationError if a SIA tie-resolution strategy uses a component the formalism's SIA result type does not support.

check_specification_measure_compatible(...)

Raise MeasureNotCompatibleError if measure isn't accepted by formalism as a specification measure.

Classes

ActualCausationFormalism(*args, **kwargs)

The minimum shape every actual-causation formalism satisfies.

ActualCausationFormalismRegistry()

Storage for actual-causation formalisms.

ApproximateFormalism(*args, **kwargs)

Formalism that computes approximate values with error characterization.

ErrorInfo(*args, **kwargs)

Error characterization for an approximate formalism's output.

ExactFormalism(*args, **kwargs)

Formalism that computes exact values via exhaustive enumeration.

FormalismRegistry()

Storage for phi formalisms.

PhiFormalism(*args, **kwargs)

The minimum shape every formalism satisfies.

Exceptions

MeasureNotCompatibleError

Raised when a configured measure isn't compatible with the active formalism.