pyphi.core.tpm.joint.JointTPM#
- class pyphi.core.tpm.joint.JointTPM(data, node_labels=None, alphabet_sizes=None)[source]#
Bases:
Displayable,ToPandasMixinRead-only joint (dense) form of a substrate TPM. See module docstring.
- Parameters:
- property alphabet_sizes: tuple[int, ...]#
The per-unit output alphabet sizes.
Unchanged by
condition(), which collapses input axes to singletons but leaves each unit’s output distribution intact.
- condition(fixed)[source]#
Return the joint view with the given input units fixed to a state.
The conditioned axes collapse to singletons; the number of dimensions is unchanged, and
alphabet_sizesstill reports the true per-unit output alphabets.
- grid_section()[source]#
The transition grid as a labeled display
Section.Mirrors
grid_section(), reading each unit’s per-state distribution from the explicit-alphabet array. Binary substrates get oneP(on)column per unit; non-binary ones get one column per(unit, next-state)pair.- Return type:
- to_xarray()[source]#
Return the joint as a labeled
xarray.DataArray.Dims are
("u0", ..., "u{N-1}", "unit", "out"): the leading axes index each unit’s current state,unitselects the output unit, andoutits next state. Values are the explicit-alphabet joint. Requires the optionalxarraydependency.- Return type: