efficiency {brainGraph}R Documentation

Calculate graph global, local, or nodal efficiency

Description

This function calculates the global efficiency of a graph or the local or nodal efficiency of each vertex of a graph.

Usage

efficiency(g, type = c("local", "nodal", "global"), weights = NULL,
  xfm = FALSE, xfm.type = NULL, use.parallel = TRUE, A = NULL,
  D = NULL)

Arguments

g

An igraph graph object

type

Character string; either local, nodal, or global. Default: local

weights

Numeric vector of edge weights; if NULL (the default), and if the graph has edge attribute weight, then that will be used. To avoid using weights, this should be NA.

xfm

Logical indicating whether to transform the edge weights. Default: FALSE

xfm.type

Character string specifying how to transform the weights. Default: 1/w

use.parallel

Logical indicating whether or not to use foreach. Default: TRUE

A

Numeric matrix; the adjacency matrix of the input graph. Default: NULL

D

Numeric matrix; the graph's “distance matrix”

Details

Local efficiency for vertex i is:

E_{local}(i) = \frac{1}{N} \sum_{i \in G} E_{global}(G_i)

where G_i is the subgraph of neighbors of i, and N is the number of vertices in that subgraph.

Nodal efficiency for vertex i is:

E_{nodal}(i) = \frac{1}{N-1} \sum_{j \in G} \frac{1}{d_{ij}}

Global efficiency for graph G with N vertices is:

E_{global}(G) = \frac{1}{N(N-1)} \sum_{i \ne j \in G} \frac{1}{d_{ij}}

where d_{ij} is the shortest path length between vertices i and j. Alternatively, global efficiency is equal to the mean of all nodal efficiencies.

Value

A numeric vector of the efficiencies for each vertex of the graph (if type is local|nodal) or a single number (if type is global).

Author(s)

Christopher G. Watson, cgwatson@bu.edu

References

Latora, V. and Marchiori, M. (2001) Efficient behavior of small-world networks. Phys Rev Lett, 87.19, 198701. doi: 10.1103/PhysRevLett.87.198701

Latora, V. and Marchiori, M. (2003) Economic small-world behavior in weighted networks. Eur Phys J B, 32, 249–263. doi: 10.1140/epjb/e2003-00095-5


[Package brainGraph version 3.1.0 Index]