-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is density normalization applied to the kernel? #25
Comments
The default is to normalize the transition probability matrix by density: Line 231 in c262b9e
Lines 432 to 442 in c262b9e
Is that what you mean? |
Thanks for the answer, @flying-sheep ! That's not exactly what I meant, my question was specifically about the kernel. I'm comparing the performance of destiny vs. palantir kernel implementation. The normalization by density seems to correspond to palantir's multispace-scaling. |
Hmm, Lines 408 to 427 in e952e95
The default kernel width Lines 303 to 304 in e952e95
|
Thank you for your answer, @flying-sheep. I'm still having trouble understanding how the package relates to the original Diffusion Maps algorithm (Coifman et al., 2005) and to destiny's associated publications (Haghverdi, 2015, 2016). I'm specially confused regarding the alpha parameter and the local scaling. According to Coifman, an adaptative kernel ('local normalized' according to Haghverdi 2016) is accompanied by an alpha parameter, which controls how much the sampling distribution is allowed to bias the diffusion operator. However, this should be independent from the kernel itself ( an anisotropic kernel can be built with alpha = 0,5 or 1, for instance). Destiny is one of the few diffusion maps packages lacking the choice of this parameter and it is not clear from documentation wether this means that alpha is simply not taken into account or set to a default value. If alpha is not taken into account, how is the Laplace-Beltrami operator approximated? |
Could you please list them, I don’t know that many implementations: In R AFAIK most people are using destiny these day, in Python people are using scanpy which has parameters for its kernels, and nobody uses MATLAB anymore. Regarding your question: destiny allows the choice between two kernels, a gaussian kernel with a global kernel width and (as scanpy) one with a kernel width that’s simply the distance to the kth nearest neighbor (as approximation for local density). ReferencesWe started using the locally adaptive kernel after submission of the destiny paper and before the DPT paper.
The DPT paper defines it in its supplementary materials, “1.1 Locally scaled transition matrix”. α is only mentioned in Coifman (2005), “One-Parameter Family of Diffusion Maps”. |
Hi,
I would like to know if the parameter density_norm represents a choice to wether normalize or not the Gaussian kernel. I'm particularly interested if this is the case because that's how Setty et al (https://www.nature.com/articles/s41587-019-0068-4) define their kernel prior to computing the diffusion operator, which seems an especially robust approach to single-cell data.
If that is not the case, is there any way to make it into destiny? In other words, how hard-coded is this into the implementation?
Edit: Sorry, I have one more question. Is it possible to set the alpha parameter to the diffusion operator?
The text was updated successfully, but these errors were encountered: