Skip to content

CRAN release 0.2.1

Compare
Choose a tag to compare
@jlmelville jlmelville released this 19 Apr 05:44
· 27 commits to master since this release

uwot 0.2.1

New features:

  • The HNSW approximate nearest neighbor search algorithm is now supported via the RcppHNSW package. Set nn_method = "hnsw" to use it. The behavior of the method can be controlled by the new nn_args parameter, a list which may contain M, ef_construction and ef. See the hnswlib library's ALGO_PARAMS documentation for details on these parameters. Although typically faster than Annoy (for a given accuracy), be aware that the only supported metric values are "euclidean", "cosine" and "correlation". Finally, RcppHNSW is only a suggested package, not a requirement, so you need to install it yourself (e.g. via install.packages("RcppHNSW")). Also see the article on HNSW in uwot in the documentation.
  • The nearest neighbor descent approximate nearest neighbor search algorithm is now supported via the rnndescent package. Set nn_method = "nndescent" to use it. The behavior of the method can be controlled by the new nn_args parameter. There are many supported metrics and possible parameters that can be set in nn_args, so please see the article on nearest neighbor descent in uwot in the documentation, and also the rnndescent package's documentation for details. rnndescent is only a suggested package, not a requirement, so you need to install it yourself (e.g. via install.packages("rnndescent")).
  • New function: umap2, which acts like umap but with modified defaults, reflecting my experience with UMAP and correcting some small mistakes. See the umap2 article for more details.

Bug fixes and minor improvements

  • init_sdev = "range" caused an error with a user-supplied init matrix.
  • Transforming new data with the correlation metric was actually using the cosine metric if you saved and reloaded the model. Thank you Holly Hall for the report and helpful detective work (#117).
  • umap_transform could fail if the new data to be transformed had the scaled:center and scaled:scale attributes set (e.g. from applying the scale function).
  • If you asked umap_transform to return the fuzzy graph (ret_extra = c("fgraph")), it was transposed when batch = TRUE, n_epochs = 0.
    Thank you PedroMilanezAlmeida for reporting (#118).
  • Setting n_sgd_threads = "auto" with umap_transform caused a crash.
  • A warning was being emitted due to not being specific enough about what dist class was meant that may have been particularly affecting Seurat users. Thank you AndiMunteanu for reporting (and suggesting a solution) (#121).