entropy {centiserve}R Documentation

Find the entropy centrality in a graph


Entropy centrality measures centrality of nodes depending on their contribution to the entropy of the graph.


entropy(graph, vids = V(graph), mode = c("all", "out", "in"),
  weights = NULL)



The input graph as igraph object


Vertex sequence, the vertices for which the centrality values are returned. Default is all vertices.


Character constant, gives whether the shortest paths to or from the given vertices should be calculated for directed graphs. If out then the shortest paths from the vertex, if in then to it will be considered. If all, the default, then the corresponding undirected graph will be used, ie. not directed paths are searched. This argument is ignored for undirected graphs.


Possibly a numeric vector giving edge weights. If this is NULL, the default, and the graph has a weight edge attribute, then the attribute is used. If this is NA then no weights are used (even if the graph has a weight attribute).


The centrality entropy measures H(ce) of a graph G, defined as:

H(ce)G=-sum(gamma(v(i)) X log2(gamma(v(i))), i=1,n)

where gamma(v(i))=paths(v(i))/paths(v(1), v(2), ..., v(M)) where paths(v(i)) is the number of geodesic paths from node v(i) to all the other nodes in the graph and paths(v(1), v(2), ..., v(M)) is the total number of geodesic paths M that exists across all the nodes in the graph.
The centrality entropy provides information on the degree of centrality for a node in the graph. Those nodes that will split the graph in two or that will reduce substantially the number of paths available to reach other nodes when removed, will have a higher impact in decreasing the total centrality entropy of a graph.
More detail at Entropy Centrality


A numeric vector contaning the centrality scores for the selected vertices.


Mahdi Jalili m_jalili@farabi.tums.ac.ir


Ortiz-Arroyo, Daniel, and DM Akbar Hussain. "An information theory approach to identify sets of key players." Intelligence and Security Informatics. Springer Berlin Heidelberg, 2008. 15-26.


g <- erdos.renyi.game(10, 1/10)

[Package centiserve version 1.0.0 Index]