efficiency function

Local and global efficiency

Local and global efficiency

Efficiency is the reciprocal of internodal distance. Thus, the efficiency beween nodes i and j is defined as ei,j=1di,je_{i,j} = \frac{1}{d_{i,j}} where di,jd_{i,j} denotes the distance between nodes i and j for all iji \neq j.

efficiency.matrix(G, mode = "in") avg.efficiency(G, mode = "in") global.efficiency(G, mode = "in")

Arguments

  • G: Graph object of class "igraph". See graph_from_literal.
  • mode: One of "in" or "out". The former considers in-path efficiencies, whereas the latter considers out-paths.

Details

The function efficiency.matrix calculates an efficiency matrix whose elements correspond to elements in the graph distance matrix. The function avg.efficiency calculates average efficiencies of nodes to all other nodes, thus providing a local measure of graph connectedness. The function global.efficiency calculates the mean of the of all pairwise efficiencies, thus providing a global measure of graph connectedness. For all three functions, reciprocals of infinite distances are taken to be zero.

References

Ek, B., VerSchneider, C., & Narayan, D. A. (2015). Global efficiency of graphs. AKCE International Journal of Graphs and Combinatorics, 12(1), 1-13.

Author(s)

Ken Aho. Gabor Csardi wrote the function distances in igraph.

Returns

The function efficiency.matrix returns a reciprocal distance matrix for nodes in G. The function avg.efficiency treats efficiency as a local measure, and thus returns a vector whose entries are average efficiencies for each node. The function global.efficiency returns a scalar (the mean of the reciprocal distance matrix).

Examples

kon_full <- streamDAGs("konza_full") efficiency.matrix(kon_full) avg.efficiency(kon_full) global.efficiency(kon_full)
  • Maintainer: Ken Aho
  • License: GPL (>= 2)
  • Last published: 2025-01-14

Useful links