pyphi.matching.environment#

Environment generators for matching.

A generator is a world distribution: a mapping from sensory-interface states (length-n 0/1 tuples) to probabilities summing to 1, suitable as the world_distribution of pyphi.matching.MatchingAnalysis. Distributions are computed exactly over the sensory interface. Keys align positionally with the caller’s sensory_indices; “contiguous” refers to that ordering.

Functions

mixture(distributions[, weights])

A weighted convex combination of distributions (pick one per draw).

noise(n, p)

Each unit independently active with probability p (product Bernoulli).

point(n, p)

A single unit active at a uniformly random location with probability p.

sample(distribution, size, *, seed)

Draw size i.i.d.

segment(n, length, p)

A run of length contiguous units at a uniformly random location.

superpose(*distributions)

Independent activation of each generator, combined by elementwise OR.