# harmonicMean: Harmonic mean of network distances In ldstatsHD: Linear Dependence Statistics for High-Dimensional Data

## Description

Finds the harmonic mean of the geodesic distances between nodes in a graph.

## Usage

 1 harmMeanDist(A, nodesDegree = NULL) 

## Arguments

 A matrix or Matrix object with adjacency matrix of a graph. nodesDegree vector with nodes degree (in case it is been previously calculated).

## Details

The geodesic distance d_{ij} between two nodes i and j of a graph is given by the shortest number of edges so that we can go from one of the nodes to the other. Then, the harmonic mean of these distances is given by

\bar{d} = [p(p-1)/(2∑_{i<j} d_{ij})]^{-1}.

## Value

The harmonic mean value.

## Author(s)

Caballe, Adria <a.caballe@sms.ed.ac.uk>, Natalia Bochkina and Claus Mayer.

## References

Costa, L. and F. Rodrigues (2007). Characterization of complex networks: A survey of measurements. Advances in Physics 56(1), 167-242.

## See Also

lambdaSelection for lambda selection approaches.

## Examples

 1 2 3 4 5 6 7 8 9 # example to use of harmonic mean function EX1 <- pcorSimulator(nobs = 50, nclusters = 2, nnodesxcluster = c(40,30), pattern = "powerLaw") y <- EX1$y out3 <- huge(y, method = "mb", lambda = 0.4) PATH <- out3$path[[1]] hm <- harmMeanDist(PATH) 

ldstatsHD documentation built on Aug. 14, 2017, 5:06 p.m.