centralization#
- graph_tool.centrality.centralization(g, measure='degree')[git][source]#
Return the Freeman centralization of the graph.
- Parameters:
- g
Graph Graph to be used.
- measure
stror callable (optional, default:"degree") Centrality measure:
"degree"(total degree),"betweenness","closeness", or"eigenvector", or a function that takes a graph and returns aVertexPropertyMap(or an array) of centralities.
- g
- Returns:
- C
float The centralization, between 0 and 1.
- C
See also
central_point_dominanceCentral point dominance of the graph
global_reaching_centralityGlobal reaching centrality
betweennessBetweenness centrality
closenessCloseness centrality
eigenvectorEigenvector centrality
Notes
Freeman’s centralization [freeman-centrality-1979] is
\[C = \frac{\sum_i (c^* - c_i)}{\max_{G'} \sum_i (c'^* - c'_i)},\]where \(c_i\) is the centrality of vertex \(i\), \(c^*\) is the largest centrality in the graph, and the maximum in the denominator is over all graphs with the same number of vertices (and directedness). It is attained by the star graph for all of the measures above, so that the denominator is computed by evaluating the measure on a star. The eigenvector centrality (with unit norm, of the graph seen as undirected) is obtained here from the eigendecomposition of the adjacency matrix, since the power iteration of
eigenvector()does not converge for bipartite graphs such as the star.References
[freeman-centrality-1979]Linton C. Freeman, “Centrality in social networks conceptual clarification”, Social Networks 1, 215-239 (1978), DOI: 10.1016/0378-8733(78)90021-7 [sci-hub, @tor]
Examples
>>> g = gt.collection.data["karate"] >>> print(gt.centralization(g), gt.centralization(g, "betweenness")) 0.3996212... 0.4055571...