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

Variance of the Gaussian kernel is not being calculated appropriately #41

Open
nbro opened this issue Apr 18, 2019 · 1 comment
Open

Comments

@nbro
Copy link

nbro commented Apr 18, 2019

In the module graph.py, you are calculating a variable sigma2 as follows sigma2 = np.mean(dist[:, -1])**2. However, this is "mu squared" (not the variance) of the last column of the distance matrix. Why not simply using dist.var()?

@mdeff
Copy link
Owner

mdeff commented Mar 19, 2021

Here we set the width sigma of the Gaussian kernel similarity = np.exp(-(distance/sigma)**2) as the mean of the farthest distance (sigma2 = sigma**2). That's an heuristic.

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

2 participants