UMAP-class {dimRed}R Documentation

Umap embedding


An S4 Class implementing the UMAP algorithm


Uniform Manifold Approximation is a gradient descend based algorithm that gives results similar to t-SNE, but scales better with the number of points.



A function that does the embedding and returns a dimRedResult object.


The standard parameters for the function.

General usage

Dimensionality reduction methods are S4 Classes that either be used directly, in which case they have to be initialized and a full list with parameters has to be handed to the @fun() slot, or the method name be passed to the embed function and parameters can be given to the ..., in which case missing parameters will be replaced by the ones in the @stdpars.


UMAP can take the follwing parameters:


The number of embedding dimensions.


The number of neighbors to be used.


The distance metric to use.


"naive" for an R implementation, "python" for the reference implementation.

Other method parameters can also be passed, see umap.defaults for details. The ones above have been standardized for the use with dimRed and will get automatically translated for umap.


The dimRed package wraps the umap packages which provides an implementation in pure R and also a wrapper around the original python package umap-learn ( This requires umap-learn version 0.4 installed, at the time of writing, there is already umap-learn 0.5 but it is not supported by the R package umap.

The "naive" implementation is a pure R implementation and considered experimental at the point of writing this, it is also much slower than the python implementation.

The "python" implementation is the reference implementation used by McInees et. al. (2018). It requires the reticulate package for the interaction with python and the python package umap-learn installed (use pip install umap-learn).


McInnes, Leland, and John Healy. "UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction."

See Also

Other dimensionality reduction methods: AutoEncoder-class, DRR-class, DiffusionMaps-class, DrL-class, FastICA-class, FruchtermanReingold-class, HLLE-class, Isomap-class, KamadaKawai-class, MDS-class, NNMF-class, PCA-class, PCA_L1-class, dimRedMethod-class, dimRedMethodList(), kPCA-class, nMDS-class, tSNE-class


## Not run: 
dat <- loadDataSet("3D S Curve", n = 300)
emb <- embed(dat, "UMAP", .mute = NULL, knn = 10)
plot(emb, type = "2vars")

## End(Not run)

[Package dimRed version 0.2.6 Index]