jlmelville/uwot

An R package implementing the UMAP dimensionality reduction method.

What it solves

High-dimensional data is hard to visualize or analyze directly. uwot brings the UMAP algorithm to R, letting you reduce many measurements (like the 4 petal and sepal dimensions of iris flowers, or the 784 pixel values of handwritten digits) down to 2 or 3 dimensions while preserving the local structure that matters. It also includes supervised learning (using labels to guide the embedding) and metric learning (embedding new points after the initial fit).

How it works

uwot is a translation of the original Python UMAP implementation into R (with C++ for the heavy lifting). You give it a data matrix, and it builds a fuzzy topological representation of the high-dimensional space, then optimizes a low-dimensional layout that matches that representation. The package provides two main functions: umap for the basic method and umap2 for the newer interface (used in the quick start). For large datasets you can plug in approximate nearest-neighbor backends like HNSW or NN-Descent via the nn_method argument, which speeds up the search for neighbors without much loss in quality.

Who it's for

R users who need to visualize or explore high-dimensional data - for example, biologists looking at single-cell RNA-seq, machine learning practitioners inspecting embeddings, or anyone wanting to see clusters in their data. It’s also useful for researchers who want a fast, validated UMAP implementation that can be called from R scripts or packages. You’ll need basic R knowledge and, if building from source, a C++17 compiler.

Highlights

  • Faithful R implementation of UMAP (from the 2018 McInnes et al. paper) with supervised and out-of-sample extensions
  • Two main entry points: umap and umap2 (quick start uses umap2)
  • Optional pluggable approximate nearest-neighbor backends: HNSW (nn_method = "hnsw") and NN-Descent (nn_method = "nndescent")
  • Ships with an MNIST example that embeds 70,000 digits and colors them by label
  • Available on CRAN and actively maintained (version 0.2.5 released August 2026)
  • Documentation and many articles available at https://jlmelville.github.io/uwot/

Related

  • Project
  • Project
  • Project
  • Project
  • Project