Builds a symmetrised Gaussian affinity matrix from a gene distance matrix and projects any negative eigenvalues up to a small positive threshold to ensure positive semi-definiteness.
ComputeGraphOperator(gene.dist.mat, knn = 10, shrink_thred = 1e-10)A square numeric distance matrix (e.g., from
LoadGeneEMD()).
Integer. Number of nearest neighbours used to set the adaptive
kernel bandwidth. Default 10.
Numeric. Eigenvalues below this threshold are replaced
by this value. Default 1e-10.
A symmetric positive semi-definite matrix (the graph operator) with
the same row/column names as gene.dist.mat.
if (FALSE) {
G <- ComputeGraphOperator(gene.dist.mat, knn = 10)
}