netcenlib.algorithms.hubbell_centrality module
- netcenlib.algorithms.hubbell_centrality.hubbell_centrality(network: Graph, weight: str = 'weight', weight_factor: float = 0.5) dict[str, float][source]
Compute the Hubbell Centrality for each node in the graph G.
Ref: https://www.centiserver.org/?q1=centrality&q2=Hubbell_Index
- Parameters:
network – NetworkX graph
optional) (weight_factor (float,) – The edge attribute that holds the numerical value used as a weight. By default, it is ‘weight’.
optional) – A scaling factor applied to the weights of the edges, representing the strength of interactions between nodes. It must be greater than 0 and less than 1 to ensure the matrix inversion needed for calculating Hubbell centrality is possible. The default value is 0.5, indicating moderate interaction strength.
- Returns:
Dictionary of nodes with computed centrality as the value