DiffusionMapsAcademics / pyDiffMap

Library for diffusion maps
MIT License
46 stars 14 forks source link

Riemannian Measure μ ? #24

Open Noeloikeau opened 8 months ago

Noeloikeau commented 8 months ago

Hello,

Thank you for the wonderful library! I have a question regarding how to obtain the Riemannian Measure / Volume Element μ, also called the leading-left eigenvector of the transition probability matrix μP = μ.

In the original NLSA paper page 3, column 2, paragraph 2 and algorithm page 4, line 40, μ is given explicitly.

Am I correct in thinking that this quantity is calculated as the reciprocal of row_sum on line 136 of diffusion_map.py during the _left_normalize function, and subsequently discarded?

Thank you for any assistance.

ehthiede commented 2 months ago

Hi,

Realizing I never responded to this: terribly sorry. I think you are correct in your assessment.

For fixed bandwith kernels I think you are correct. Then the generator is given by (D_p^{-1} K - I) / e, where p is the row-sum of K. It is easy to see that p is then a left-eigenvector of the generator. For variable-bandwidth kernels we later left-multiply by (1/h(x)^2) where h(x) is the bandwidth function. Then, to construct the density you would need to take the output of _left_normalize and divide by h(x)^2, I believe. Hope that helps, and sorry again for the delay.