barycenter {centiserve} | R Documentation |
Barycenter scores are calculated as 1 / (total distance from vertex v to all other vertices) in a strongly connected network.
barycenter(graph, vids = V(graph), mode = c("all", "out", "in"), weights = NULL)
graph |
The input graph as igraph object |
vids |
Vertex sequence, the vertices for which the centrality values are returned. Default is all vertices. |
mode |
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. |
weights |
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). |
There are 2 types of distance centrality scores, Closeness Centrality and Barycenter Centrality.
Barycenter Centrality for vertex v defined as:
1 / (total distance from v to all other vertices)
Closeness scores are calculated using the formula 1 / (average distance from vertex v to all other vertices) and Barycenter scores are calculated as 1 / (total distance from vertex v to all other vertices).
More detail at Barycenter Centrality
A numeric vector contaning the centrality scores for the selected vertices.
Mahdi Jalili m_jalili@farabi.tums.ac.ir
Viswanath, Meghana. Ontology-based automatic text summarization. Diss. University of Georgia, 2009.
g <- graph(c(1,2,2,3,3,4,4,2), directed=FALSE) barycenter(g)