-
Notifications
You must be signed in to change notification settings - Fork 19
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
Bug on clustering_DPA and its pure python version #70
Comments
To reproduce the bug: import numpy as np #Assuming the downloaded data are stored in 'your_download_folder' load it with: d = data.Data(distances=(dist, index), maxk = 50, verbose = False) Python: 3.8.2 |
I found the same bug on the data that I posted in order to reproduce it. |
@diegodoimo, could you add the line loading the data? |
I'm acually working on it. I'll post a possibile solution asap. I added the lines to load it above |
@diegodoimo, there are two possible solutions: One, that it would be the coherent with the paper description, is that when the nearest element with higher g is not in the neighbor list, compute the distances to all the elements with higher g and then take the minimum (but for this you would need the coordinates, not only the neighbor distances). The other option would be to ignore the restriction that you cannot have a center that is a neighbor of a point with higher g (this is a patch that would generate some inconsistencies but would allow to use only distances and indexes as input). |
I posted an attempt of solution at: I don't think we should use the coordinates, as the entire class would not work if one gives as input just the distances. |
solution issue #70 in ADP cython and pure_python version
Was this issue solved via #71 ? |
Yes |
I close this issue since it has been solved! |
Subject of the issue
This issue appears mainly when using small maxk values. When looking for the nearest element with a higher g, it may happen that all the elements in the self.dist_indices vector are still not assigned. This is a consequence of the last step while finding the centers, when we remove centers from list if they are neighbors of higher density points.
I think that I know how to solve the issue, so I will do it when I have time.
Your environment
Steps to reproduce
Tell us how to reproduce this issue.
Expected behaviour
Tell us what should happen
Actual behaviour
Tell us what happens instead
The text was updated successfully, but these errors were encountered: