Temporal network classes

Undirected and unweighted temporal networks are composed of \(N\) nodes and up to \(m_{\mathrm{max}}=N(N+1)/2\) edges, where each edge \((i,j)\) can be described as a series of events where the edge is either switched on or switched off. One way of expressing that is to define the temporal adjacency matrix

\[\begin{split}A_{ij}(t) = \begin{cases} 1, & (i,j)\ \mathrm{connected\ at\ time\ } t\\ 0, & \mathrm{else}. \end{cases}\end{split}\]

In tacoma, we will interpret temporal networks as if they were recorded in an experiment. We expect that over the course of time \(t_0\leq t < t_\mathrm{max}\) in which we record activity, we will encounter \(N\) nodes from the node set \(V={0,1,\dots,N-1}\) (nodes posses an integer label).

The experiment begins at time \(t_0\), where the network consists of an edge set \(E_0 \subseteq \{i,j: V\times V, i<j\}\). Then, each time the network changes, we denote that time by an entry in a time vector \(t\). Each entry in the time vector corresponds to a network change event and thus to a change in the edge set. We call the total number of change events \(N_e\), such that the vector \(t\) has \(N_e\) entries. In between consecutive times, the network is constant. After the last recorded event, we kept the experiment running until the maximum time \(t_\mathrm{max}\) without observing any change and stopped recording at \(t_\mathrm{max}\).

There’s three data structures implemented in this package, all of which capture the situation described above in different ways and are useful in different situations.

Edge lists

The class _tacoma.edge_lists consists of a collection of complete edge lists, each time the network changes, a complete edge list of the network after the change is saved. It has the following attributes.

  • \(N\) : The total number of nodes
  • \(t\) : A vector of length \(N_e+1\). The 0-th entry contains the time of the beginning of the experiment \(t_0\)
  • edges : A vector of length \(N_e+1\) where each entry contains an edge list, describing the network after the change which occured at the corresponding time in \(t\). The 0-th entry contains the edge list of the beginning of the experiment \(t_0\)
  • \(t_\mathrm{max}\) : The time at which the experiment ended.

Additionally,

Edge changes

The class _tacoma.edge_changes consists of a collection of both edges being created and edges being deleted. It has the following attributes.

  • \(N\) : The total number of nodes.
  • \(t_0\) : The time of the beginning of the experimen.
  • edges_initial : The edge list of the beginning of the experiment at \(t_0\).
  • \(t\) : A vector of length \(N_e\), each time corresponding to a change in the network.
  • \(t_\mathrm{max}\) : The time at which the experiment ended.

Additionally,

Edge trajectories