closeness.currentflow: Find current-flow closeness centrality

Description Usage Arguments Details Value Author(s) References Examples

Description

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.

Usage

1
closeness.currentflow(graph, vids = V(graph), weights = NULL)

Arguments

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).

Details

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

Value

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

Author(s)

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.

References

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.

Examples

1
2
g <- graph(c(1,2,2,3,3,4,4,2), directed=FALSE)
closeness.currentflow(g)

Example output

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: Matrix
[1] 0.6923077 1.2857143 1.0000000 1.0000000

centiserve documentation built on May 2, 2019, 6:01 a.m.