Extremal distance (nd.extremal) is a type of spectral distance measures on two graphs' graph Laplacian, [REMOVE_ME]L:=D−A[REMOVEME2]
where A is an adjacency matrix and Dii=∑jAij. It takes top-k eigenvalues from graph Laplacian matrices and take normalized sum of squared differences as metric. Note that it is 1. non-negative, 2. separated, 3. symmetric, and satisfies 4. triangle inequality in that it is indeed a metric.
nd.extremal(A, out.dist =TRUE, k = ceiling(nrow(A)/5))
Arguments
A: a list of length N containing adjacency matrices.
out.dist: a logical; TRUE for computed distance matrix as a dist object.
k: the number of largest eigenvalues to be used.
Returns
a named list containing
D: an (N×N) matrix or dist object containing pairwise distance measures.
spectra: an (N×k) matrix where each row is top-k Laplacian eigenvalues.
Description
Extremal distance (nd.extremal) is a type of spectral distance measures on two graphs' graph Laplacian,
L:=D−A
where A is an adjacency matrix and Dii=∑jAij. It takes top-k eigenvalues from graph Laplacian matrices and take normalized sum of squared differences as metric. Note that it is 1. non-negative, 2. separated, 3. symmetric, and satisfies 4. triangle inequality in that it is indeed a metric.