Normalized Laplacian matrix contains topological information of a corresponding network via its spectrum. nd.wsd adopts weighted spectral distribution of eigenvalues and brings about a metric via binning strategy.
nd.wsd(A, out.dist =TRUE, K =50, wN =4)
Arguments
A: a list of length N containing (M×M) adjacency matrices.
out.dist: a logical; TRUE for computed distance matrix as a dist object.
K: the number of bins for the spectrum interval [0,2].
wN: a decaying exponent; default is 4 set by authors.
Returns
a named list containing
D: an (N×N) matrix or dist object containing pairwise distance measures.
spectra: an (N×M) matrix of rows being eigenvalues for each graph.
Examples
## load example data and extract a fewdata(graph20)gr.small = graph20[c(1:5,11:15)]## compute distance matrixoutput = nd.wsd(gr.small, out.dist=FALSE, K=10)## visualizeopar = par(no.readonly=TRUE)par(pty="s")image(output$D[,10:1], main="two group case", axes=FALSE, col=gray(0:32/32))par(opar)