closeness.currentflow {centiserve} | R Documentation |
Current-flow closeness centrality is defined by:
C_cc(s)=(n-1)/sum(p_st(s), s!=t) - p_st(t) for all: s in V
where (n-1) is a normalizing factor, p_st(s) is the absolute electrical potential of vertex s based on the electrical current supply from vertex s to vertex t, and p_st(s) - p_st(t) corresponds to the effective resistance typically measured as voltage, which can be interpreted as an alternative measure of distance between s and t.
closeness.currentflow(graph, vids = V(graph), 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. |
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). |
The closeness index based on shortest paths can also be transformed to a measure based on electrical current. For the electrical current model set, Brandes et al. developed an alternative measure of the distance between two vertices s and t, which is defined as the difference of their electrical potentials.
More detail at Current-Flow Closeness Centrality
A numeric vector contaning the centrality scores for the selected vertices.
Mahdi Jalili m_jalili@farabi.tums.ac.ir
Note: This implementation is based on Daniel Fleischer's implementation for yFiles and JMP which convert to java implementation for CentiLib by Johannes Graessler and Dirk Koschuetzki.
Brandes, Ulrik, and Daniel Fleischer. Centrality measures based on current flow. Springer Berlin Heidelberg, 2005.
Grabler, Johannes, Dirk Koschutzki, and Falk Schreiber. "CentiLib: comprehensive analysis and exploration of network centralities." Bioinformatics 28.8 (2012): 1178-1179.
g <- graph(c(1,2,2,3,3,4,4,2), directed=FALSE) closeness.currentflow(g)