-
Notifications
You must be signed in to change notification settings - Fork 595
Adding checks for UMAP precomputed KNN feature #7300
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
Adding checks for UMAP precomputed KNN feature #7300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the expectation that the MRE provided in #5717 just fails with ValueError
now?
I just updated the PR so that if the number of neighbors provided in the precomputed KNN graph is higher than the number of requested neighbors, the graph is trimmed instead of raising an exception. |
How does umap-learn handle this case? |
In the case of more neighbors than requested it trims the pre-computed KNN graph. In case there are less than required it displays a discrete warning, drops the pre-computed graph and proceed with the computation of a new KNN graph from scratch. But, I feel like raising an exception here is a better choice to alert the user in case the KNN graph has an insufficient number of nearest neighbors instead of almost silently computing a new graph. What do you think? |
Yes, absolutely. I agree that matching the behavior w.r.t. to pruning makes sense. We should however fail with an exception instead of computing the KNN graph on an insufficient number of neighbors. We can implement a 100% match of the behavior in cuml.accel only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, but overall LGTM! Thanks a lot!
/merge |
Closes #5717