Open davisidarta opened 4 years ago
The default is to normalize the transition probability matrix by density:
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, density_norm
does what you see in the code quoted above. The kernel is applied here:
The default kernel width sigma
is set to 'local'
which means that it’s adapted to density:
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?
Destiny is one of the few diffusion maps packages lacking the choice of this parameter
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).
We 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?