pyphi.matching.triggered_tpm.TriggeredTPM#

class pyphi.matching.triggered_tpm.TriggeredTPM(array, *, sensory_indices, system_indices, node_labels)[source]#

Bases: object

Pr(Sₜ = s | ∂S_{t−τ} = x), one distribution over system states per stimulus.

Variables:
  • array (numpy.ndarray) – A multidimensional array with one binary axis per unit, ordered (sensory axes..., system axes...); array[x + s] is Pr(S = s | ∂S = x). Marginalizing a unit subset is a uniform axis sum.

  • sensory_indices (tuple of int) – Substrate indices of the sensory-interface units, in axis order.

  • system_indices (tuple of int) – Substrate indices of the system units, in axis order.

  • node_labels (NodeLabels) – Labels for the substrate units, for the labeled to_pandas view.

Parameters:
row(stimulus)[source]#

The system-state distribution for one stimulus.

Parameters:

stimulus (tuple[int, ...])

Return type:

ndarray

argmax_state(stimulus)[source]#

The most-probable system state for a stimulus (the triggered state).

Ties resolve to the first maximum in little-endian state order.

Parameters:

stimulus (tuple[int, ...])

Return type:

tuple[int, …]

conditional_probability(mechanism, state, stimulus)[source]#

Pr(mechanism = state | ∂S = stimulus).

Return type:

float

marginal_probability(mechanism, state)[source]#

Pr(mechanism = state), the uniform-prior marginal over stimuli.

Return type:

float

to_pandas()[source]#

Labeled view: rows = stimulus states, columns = system states, values = Pr(s | x).

Return type:

DataFrame