Learn R Programming

ldstatsHD (version 1.0.1)

graphCorr: One minus graph correlation matrix

Description

graphCorr computes the dissimilarity matrix (one minus the correlation matrix) of a graph structure.

Usage

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

Value

a dissimilarity lower triangular matrix with one minus the correlation of the graph nodes.

Details

The similarity matrix of a graph is given by $$ \sigma_{ij} = \frac{\eta_{ij}}{\sqrt{k_ik_j}}, $$ where \(\eta_{ij}\) is defined by the number of common neighbors of nodes \(i\) and \(j\) and \(k_i\) is the degree of the node \(i\). The dissimilarity matrix is given by $$ \delta_{ij} = 1- \sigma_{ij}. $$

References

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

See Also

graphDist for inverse of the geodesic distance matrix.

Examples

Run this code
# NOT RUN {
# example to use of graphCorr function
EX1         <- pcorSimulator(nobs = 50, nclusters = 2, nnodesxcluster = c(40,30), 
                             pattern = "powerLaw")
y           <- EX1$y
out3        <- huge(y, method = "mb", lambda = 0.4)
gc          <- graphCorr(out3$path[[1]])
  
 
# }

Run the code above in your browser using DataLab