rapids_singlecell.tl.diffmap#
- rapids_singlecell.tl.diffmap(adata, n_comps=15, *, neighbors_key=None, sort='decrease', density_normalize=True)[source]#
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
(default:None
) If not specified, diffmap looks at
.obsp['connectivities']
for neighbors connectivities If specified, diffmap looks at.obsp['neighbors_key_ connectivities']
for neighbors connectivities- sort
str
(default:'decrease'
) Leave as is for the same behavior as sc.tl.diffmap
- density_normalize
bool
(default:True
) Leave as is for the same behavior as sc.tl.diffmap
- adata
- Return type:
- Returns:
updates
adata
with the following fields.X_diffmap
numpy.ndarray
(adata.obsm
)Diffusion map representation of data, which is the right eigen basis of the transition matrix with eigenvectors as columns.
diffmap_evals
numpy.ndarray
(adata.uns
)Array of size (number of eigen vectors). Eigenvalues of transition matrix.