rapids_singlecell.tl.diffmap#
- rapids_singlecell.tl.diffmap(adata, n_comps=15, *, neighbors_key=None, sort='decrease', density_normalize=True)[source]#
Diffusion Maps [CLL+05, HBT15].
Diffusion maps has been proposed for visualizing single-cell data. This is a reimplementation of scanpys function.
The width (“sigma”) of the connectivity kernel is implicitly determined by the number of neighbors used to compute the single-cell graph in
scanpy.pp.neighbors()orneighbors().- Parameters:
- adata
AnnData Annotated data matrix.
- n_comps
int(default:15) The number of dimensions of the representation.
- neighbors_key
str|None(default:None) Key in
adata.unswhere neighbor parameters are stored. IfNone, defaults to"neighbors".- sort
Literal['decrease','increase'] (default:'decrease') Leave as is for the same behavior as
scanpy.tl.diffmap().- density_normalize
bool(default:True) Leave as is for the same behavior as
scanpy.tl.diffmap().
- adata
- Return type:
- Returns:
Updates
adatawith the following fields:adata.obsm['X_diffmap']numpy.ndarrayDiffusion map representation of data, which is the right eigen basis of the transition matrix with eigenvectors as columns.
adata.uns['diffmap_evals']numpy.ndarrayArray of size (number of eigen vectors). Eigenvalues of transition matrix.