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

UMAP trustworthiness and continuity? #122

Open
davidechicco opened this issue Apr 9, 2024 · 1 comment
Open

UMAP trustworthiness and continuity? #122

davidechicco opened this issue Apr 9, 2024 · 1 comment

Comments

@davidechicco
Copy link

Hi
Thanks for having developed and released the uwot R package. Is there a function that can express trustworthiness and continuity of the UMAP results?

Best regards,

-- Davide Chicco

@jlmelville
Copy link
Owner

jlmelville commented Apr 10, 2024

Unfortunately, there are no trustworthiness and continuity functions in uwot. I wrote some evaluation functions at https://github.com/jlmelville/quadra but I am not sure how valuable they are.

Personally, I find that evaluating the nearest neighbor preservation at a handful of nearest neighbor values (e.g. 15, 50, 150) works well enough for me. If you are prepared to install https://github.com/jlmelville/rnndescent then it's not too hard to evaluate the overlap at whatever value of n_neighbors you used e.g.:

library(uwot)
library(rnndescent)

n_neighbors <- 10
res <- umap(iris, ret_nn = TRUE, n_neighbors = n_neighbors)
high_dim_nn <- res$nn$euclidean
# brute_force_knn and neighbor_overlap both come from rnndescent
low_dim_nn <-
  brute_force_knn(res$embedding, k = n_neighbors, n_threads = 6)
neighbor_overlap(high_dim_nn, low_dim_nn)

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