node

Represents a node in a subsystem. Each node has a unique index, its position in the network’s list of nodes.

class pyphi.node.Node(network, index, subsystem, label=None)

A node in a subsystem.

network

network – The network the node belongs to.

index

int – The node’s index in the network’s list of nodes.

subsystem

Subsystem – The subsystem the node belongs to.

label

str – An optional label for the node.

inputs

list(Node – A list of nodes that have connections to this node.

past_tpm

np.ndarray – The TPM for this node, conditioned on the past state of the boundary nodes, whose states are fixed. this_node.past_tpm[0] and this_node.past_tpm[1] gives the probability tables that this node is off and on, respectively, indexed by subsystem state, after marginalizing-out nodes that don’t connect to this node.

current_tpm

np.ndarray – Same as past_tpm, but conditioned on the current state of the boundary nodes.

Examples

In a 3-node subsystem, self.past_tpm[0][(0, 0, 1)] gives the probability that this node is off at \(t_0\) if the state of the network is \(\{N_0 = 0, N_1 = 0, N_2 = 1\}\) at \(t_{-1}\).

Similarly, self.current_tpm[1][(0, 0, 1)] gives the probability that this node is on at |t_1| if the state of the network is \(\{N_0 = 0, N_1 = 0, N_2 = 1\}\) at \(t_0\).

get_marbl(direction, normalize=True)

Generate a Marbl for this node, using either the past or current TPM.

inputs

The set of nodes with connections to this node.

outputs

The set of nodes this node has connections to.

past_marbl

The normalized representation of this node’s Markov blanket, conditioned on the fixed state of boundary-condition nodes in the previous timestep.

current_marbl

The normalized representation of this node’s Markov blanket, conditioned on the fixed state of boundary-condition nodes in the current timestep.

raw_past_marbl

The un-normalized representation of this node’s Markov blanket, conditioned on the fixed state of boundary-condition nodes in the previous timestep.

raw_current_marbl

The un-normalized representation of this node’s Markov blanket, conditioned on the fixed state of boundary-condition nodes in the current timestep.

__eq__(other)

Return whether this node equals the other object.

Two nodes are equal if they belong to the same subsystem and have the same index (their TPMs must be the same in that case, so this method doesn’t need to check TPM equality).

Labels are for display only, so two equal nodes may have different labels.

json_dict()