dimred_umap {dyndimred} | R Documentation |
UMAP
Description
UMAP
Usage
dimred_umap(
x,
ndim = 2,
distance_method = c("euclidean", "cosine", "manhattan"),
pca_components = 50,
n_neighbors = 15L,
init = "spectral",
n_threads = 1
)
Arguments
x |
Log transformed expression data, with rows as cells and columns as features |
ndim |
The number of dimensions |
distance_method |
The name of the distance metric, see dynutils::calculate_distance |
pca_components |
The number of pca components to use for UMAP. If NULL, PCA will not be performed first |
n_neighbors |
The size of local neighborhood (in terms of number of neighboring sample points). |
init |
Type of initialization for the coordinates. Options are:
For spectral initializations, ( |
n_threads |
Number of threads to use (except during stochastic gradient
descent). Default is half the number of concurrent threads supported by the
system. For nearest neighbor search, only applies if
|
See Also
Examples
library(Matrix)
dataset <- abs(Matrix::rsparsematrix(100, 100, .5))
dimred_umap(dataset, ndim = 2, pca_components = NULL)