Skip to content
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

What is the actual formula to construct the affinity kernel matrix? #69

Open
caodudu opened this issue Jul 15, 2024 · 1 comment
Open

Comments

@caodudu
Copy link

caodudu commented Jul 15, 2024

Hi. In the paper, The adaptive Gaussian kernel was given by $$M(x_i.x_j)=\frac{1}{\sqrt{2\pi(\sigma_i+\sigma_j)}}e^{\left(-\frac{1}{2}\frac{(x_i-x_j)^T(x_i-x_j)}{\sigma_i+\sigma_j}\right)}$$. However, in the script (~/SEACells/build_graph.py), I noted the method constructing affinity kernel matrix is more similar to $$M(x_i​,x_j​)=e^{(−\frac{|x_i​−x_j​|^2}{​σ_i​\cdotσ_j}​)}$$? So did I misunderstand something about it?

@caodudu
Copy link
Author

caodudu commented Jul 15, 2024

And when I applid the nominal formula $$M(x_i.x_j)=\frac{1}{\sqrt{2\pi(\sigma_i+\sigma_j)}}e^{\left(-\frac{1}{2}\frac{(x_i-x_j)^T(x_i-x_j)}{\sigma_i+\sigma_j}\right)}$$ and assumpted $$x_i = x_j$$, We could find that $$M(x_i,x_j) \leq \frac{1}{\sqrt{2\pi}}\approx 0.4 $$. The upper bound seems weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant