stream2.tl.dimension_reduction
- stream2.tl.dimension_reduction(adata, n_neighbors=15, n_components=2, random_state=2020, layer=None, obsm=None, n_dim=None, method='umap', eigen_solver='auto', **kwargs)[source]
perform dimension reduction
- Parameters:
adata (AnnData) – Annotated data matrix.
method (str, optional (default: ‘umap’)) – Choose from {{‘umap’,’se’,’mlle’,’tsne’,’isomap’}} Method used for dimension reduction. ‘umap’: Uniform Manifold Approximation and Projection ‘se’: Spectral embedding algorithm ‘mlle’: Modified locally linear embedding algorithm ‘tsne’: T-distributed Stochastic Neighbor Embedding ‘isomap’: Isomap Embedding
- Returns:
updates adata with the following fields
`.obsm[‘X_umap’]` (numpy.ndarray) – UMAP coordinates of samples.