theislab / destiny

R package for single cell and other data analysis using diffusion maps
https://theislab.github.io/destiny/
GNU General Public License v3.0
76 stars 12 forks source link

why are eigenvalues in decreasing order? #19

Open taylorreiter opened 5 years ago

taylorreiter commented 5 years ago

When using the destiny implementation of diffusion maps, we observed that eigenvalues obtained were decreasing, starting from the first index to the last. Have the values been altered (additively inverted)? I'm used to seeing the leading eigenvalue have the smallest value second to the zero values, and am having a hard time interpreting the meaning of the eigenvalues returned by eigenvalues(dm). Thank you!

flying-sheep commented 5 years ago

That’s curious, the most popular numerical spectral decomposition algorithm (Arnoldi/Lanczos) is used everywhere in its ARPACK implementation. Scipy, igraph, MATLAB, you name it.

And that algorithm is best at finding extremal eigenvalues. Every single one of those popular libraries should give you the largest-magnitude eigenvalues by default and warn you that finding the small ones will be slow and maybe won’t converge.

So where did you see those unusual small eigenvalues?

PS: check out the text below eqn. 9 here for interpretation of the eigenvalues. lower = noisier