temporal_betweenness_centrality

temporal_betweenness_centrality(tnet=None, paths=None, calc='pertime')[source]

Returns temporal betweenness centrality per node.

Parameters:
  • data (array or dict) – Temporal network input (graphlet or contact). nettype: ‘bu’, ‘bd’.
  • calc (str) – either ‘overtime’ or ‘pertime’
  • paths (pandas dataframe) – Output of TenetoBIDS.networkmeasure.shortest_temporal_paths

Note

Input should be either tnet or paths.

Returns:normalized temporal betweenness centrality.
If calc = ‘pertime’, returns (node,time)

If calc = ‘overtime’, returns (node)

Return type:close: array

Notes

Temporal betweenness centrality uses the shortest temporal paths and calculates betweennesss from it.

Teneto returns a normalized betweenness centrality value, defined as [Bet-1]:

\[B_{it} = {1 \over (N-1)(N-2)} \sum_{j = 1; j \neq i} \sum_{k = 1; k \neq i,j} {\sigma^i_{jkt} \over \sigma_{jk}}\]

If there is a shortest temporal path from j to k, starting at t that goes through node i, then \(\sigma^i_{jkt}\) is 1, otherwise 0. \(\sigma_{jk}\) is the total number of paths that exist from j to k. The remaining part of the equation normalizes by the number of nodes.

If a temporal network is used as input (i.e. not the paths), then teneto uses shortest_temporal_path() to calculates the shortest paths. See shortest_temporal_path() for more details.

If calc=overtime then the average B over time is returned.

References

[Bet-1]Tang, J., Musolesi, M., Mascolo, C., Latora, V., & Nicosia, V. (2010). Analysing Information Flows and Key Mediators through Temporal Centrality Metrics Categories and Subject Descriptors. Proceedings of the 3rd Workshop on Social Network Systems. [`Link https://doi.org/10.1145/1852658.1852661`_]