networksns.centrality_measures.approximated_broadcast_centrality

networksns.centrality_measures.approximated_broadcast_centrality(G, alpha=None)

Computes an approximated version of the broadcast centrality.

Denoting with \(A_t\) the adjacency matrix at time \(t\) and with \(\mathbf{1}\) the vector of all ones approximated broadcast centrality is given by \(bc = (I+\alpha A_1)(I+\alpha A_2)...(I+\alpha A_k)^{-1} \mathbf{1}\) [1].

This formula is an approximated version of the classic broadcast centrality \(bc = (I-\alpha A_1)^{-1}(I-\alpha A_2)^{-1}...(I-\alpha A_k)^{-1} \mathbf{1}\) where each power series is truncated to the first order.

Parameters:
  • G (DynGraph object) – a dynamic graph.

  • alpha (float, optional) – parameter, if None \(\alpha = 0.9 \frac{1}{\rho^*}\), where \(\rho^* = \max_t \rho(A_t)\), default None.

Returns:

bc – approximated broadcast centrality.

Return type:

dict

alpha: float

alpha parameter.

Examples

>>>  from networksns import centrality_measures as cm
>>>  import dynetx as dn

Create dynamic graph \(G\)

>>>    G = dn.DynGraph()
>>>    G.add_interaction(1, 2, 2, 5)
>>>    G.add_interaction(1, 3, 2, 5)
>>>    G.add_interaction(2, 3, 4)
        EdgeView([(1, 2), (1, 3), (2, 3)])

Compute approximated broadcast centrality

>>>   bc, alpha = cm.approximated_broadcast_centrality(G)

References