networksns.centrality_measures.approximated_receive_centrality

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

Computes an approximated version of the receive centrality.

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

This formula is an approximated version of the classic receive centrality \(rc = (I-\alpha A_k)^{-1}(I-\alpha A_{k-1})^{-1}...(I-\alpha A_1)^{-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.

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 receive centrality

>>>   bc, alpha = cm.approximated_receive_centrality(G)
Returns:

rc – approximated receive centrality.

Return type:

dict

alpha: float

alpha parameter.

References