uwot

An R package implementing the UMAP dimensionality reduction method.

https://github.com/jlmelville/uwot

Science Score: 46.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
    1 of 9 committers (11.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.6%) to scientific vocabulary

Keywords

dimensionality-reduction r umap

Keywords from Contributors

bioconductor human-cell-atlas bioinformatics
Last synced: 6 months ago · JSON representation

Repository

An R package implementing the UMAP dimensionality reduction method.

Basic Info
Statistics
  • Stars: 339
  • Watchers: 21
  • Forks: 31
  • Open Issues: 18
  • Releases: 24
Topics
dimensionality-reduction r umap
Created over 7 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog License

README.md

uwot

R-CMD-check AppVeyor Build Status Coverage Status CRAN Status Badge Dependencies Downloads (monthly) Downloads (total) Last Commit <!-- badges: end -->

An R implementation of the Uniform Manifold Approximation and Projection (UMAP) method for dimensionality reduction of McInnes et al. (2018). Also included are the supervised and metric (out-of-sample) learning extensions to the basic method. Translated from the Python implementation.

News

February 24 2025 uwot version 0.2.3 has been released to CRAN. This release mainly fixes some bugs, including one that was causing an error with an upcoming version of R-devel. One new feature: set rng_type = "deterministic" to use a deterministic sampling of vertices during the optimization phase which will give faster and more reproducible output at the cost of accuracy. The idea for this came straight from Leland McInnes via Reddit.

April 21 2024 As ordained by prophecy, version 0.2.2 of uwot has been released to CRAN. RSpectra is back as a main dependency and I thought I had worked out a clever scheme to avoid the failures seen in some installations with the irlba/Matrix interactions. This releases fixes the problem on all the systems I have access to (including GitHub Actions CI) but some CRAN checks remain failing. How embarrassing. That said, if you have had issues, it's possible this new release will help you too.

Installing

From CRAN

R install.packages("uwot")

From github

uwot makes use of C++ code which must be compiled. You may have to carry out a few extra steps before being able to build this package:

Windows: install Rtools and ensure C:\Rtools\bin is on your path.

Mac OS X: using a custom ~/.R/Makevars may cause linking errors. This sort of thing is a potential problem on all platforms but seems to bite Mac owners more. The R for Mac OS X FAQ may be helpful here to work out what you can get away with. To be on the safe side, I would advise building uwot without a custom Makevars.

R install.packages("devtools") devtools::install_github("jlmelville/uwot")

Example

```R library(uwot)

umap2 is a version of the umap() function with better defaults

iris_umap <- umap2(iris)

but you can still use the umap function (which most of the existing

documentation does)

iris_umap <- umap(iris)

Load mnist from somewhere, e.g.

devtools::install_github("jlmelville/snedata")

mnist <- snedata::download_mnist()

mnistumap <- umap(mnist, nneighbors = 15, mindist = 0.001, verbose = TRUE) plot( mnistumap, cex = 0.1, col = grDevices::rainbow(n = length(levels(mnist$Label)))[as.integer(mnist$Label)] |> grDevices::adjustcolor(alpha.f = 0.1), main = "R uwot::umap", xlab = "", ylab = "" )

I recommend the following optional packages

for faster or more flexible nearest neighbor search:

install.packages(c("RcppHNSW", "rnndescent")) library(RcppHNSW) library(rnndescent)

Installing RcppHNSW will allow the use of the usually faster HNSW method:

mnistumaphnsw <- umap(mnist, nneighbors = 15, mindist = 0.001, nn_method = "hnsw")

nndescent is also available

mnistumapnnd <- umap(mnist, nneighbors = 15, mindist = 0.001, nn_method = "nndescent")

umap2 will choose HNSW by default if available

mnist_umap2 <- umap2(mnist) ```

MNIST UMAP

Documentation

https://jlmelville.github.io/uwot/. For more examples see the get started doc. There are plenty of articles describing various aspects of the package.

License

GPLv3 or later.

Citation

If you want to cite the use of uwot, then use the output of running citation("uwot") (you can do this with any R package).

See Also

Owner

  • Name: James Melville
  • Login: jlmelville
  • Kind: user
  • Location: San Diego

"The work of a lazy, self-indulgent man"

GitHub Events

Total
  • Create event: 1
  • Release event: 1
  • Issues event: 12
  • Watch event: 18
  • Issue comment event: 18
  • Push event: 56
Last Year
  • Create event: 1
  • Release event: 1
  • Issues event: 12
  • Watch event: 18
  • Issue comment event: 18
  • Push event: 56

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 993
  • Total Committers: 9
  • Avg Commits per committer: 110.333
  • Development Distribution Score (DDS): 0.015
Past Year
  • Commits: 56
  • Committers: 1
  • Avg Commits per committer: 56.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
James Melville j****e@g****m 978
sirusb d****d@g****m 3
LTLA i****s@g****m 3
Dirk Eddelbuettel e****d@d****g 3
Keith Hughitt k****t@g****m 2
james-vivodyne j****e@v****m 1
Tim Triche, Jr t****e@g****m 1
Yuhan Hao h****y@s****g 1
Aaron Lun a****n@w****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 110
  • Total pull requests: 15
  • Average time to close issues: 9 months
  • Average time to close pull requests: about 7 hours
  • Total issue authors: 75
  • Total pull request authors: 6
  • Average comments per issue: 6.13
  • Average comments per pull request: 2.8
  • Merged pull requests: 15
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 7
  • Pull requests: 0
  • Average time to close issues: 2 months
  • Average time to close pull requests: N/A
  • Issue authors: 7
  • Pull request authors: 0
  • Average comments per issue: 1.57
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jlmelville (15)
  • LTLA (5)
  • PedroMilanezAlmeida (4)
  • ilyakorsunsky (3)
  • SamGG (3)
  • akhst7 (3)
  • juba (2)
  • OuNao (2)
  • jielab (2)
  • mytarmail (2)
  • Harini-107 (2)
  • jianshu93 (2)
  • ummel (2)
  • yuhanH (2)
  • Ax3man (1)
Pull Request Authors
  • jlmelville (9)
  • eddelbuettel (3)
  • sirusb (2)
  • LTLA (2)
  • khughitt (1)
  • yuhanH (1)
Top Labels
Issue Labels
enhancement (20) bug (16) help wanted (1)
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • cran 37,159 last-month
  • Total docker downloads: 174,289
  • Total dependent packages: 36
    (may contain duplicates)
  • Total dependent repositories: 169
    (may contain duplicates)
  • Total versions: 38
  • Total maintainers: 1
cran.r-project.org: uwot

The Uniform Manifold Approximation and Projection (UMAP) Method for Dimensionality Reduction

  • Versions: 15
  • Dependent Packages: 32
  • Dependent Repositories: 165
  • Downloads: 37,159 Last month
  • Docker Downloads: 174,289
Rankings
Docker downloads count: 0.0%
Stargazers count: 1.4%
Dependent repos count: 1.5%
Average: 1.7%
Downloads: 2.4%
Forks count: 2.4%
Dependent packages count: 2.5%
Maintainers (1)
Last synced: 6 months ago
proxy.golang.org: github.com/jlmelville/uwot
  • Versions: 15
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
conda-forge.org: r-uwot
  • Versions: 8
  • Dependent Packages: 4
  • Dependent Repositories: 4
Rankings
Dependent packages count: 12.5%
Dependent repos count: 16.1%
Average: 20.3%
Stargazers count: 22.6%
Forks count: 30.2%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • Matrix * depends
  • FNN * imports
  • Rcpp * imports
  • RcppAnnoy >= 0.0.17 imports
  • irlba * imports
  • methods * imports
  • RSpectra * suggests
  • bigstatsr * suggests
  • covr * suggests
  • testthat * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/lint.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite