MULTIVI.get_latent_representation(adata=None, modality='joint', indices=None, give_mean=True, batch_size=None)[source]

Return the latent representation for each cell.

adata : AnnData | NoneOptional[AnnData] (default: None)

AnnData object with equivalent structure to initial AnnData. If None, defaults to the AnnData object used to initialize the model.

modality : {‘joint’, ‘expression’, ‘accessibility’}Literal[‘joint’, ‘expression’, ‘accessibility’] (default: 'joint')

Return modality specific or joint latent representation.

indices : Sequence[int] | NoneOptional[Sequence[int]] (default: None)

Indices of cells in adata to use. If None, all cells are used.

give_mean : boolbool (default: True)

Give mean of distribution or sample from it.

batch_size : int | NoneOptional[int] (default: None)

Minibatch size for data loading into model. Defaults to scvi.settings.batch_size.

Return type



-latent_representation (ndarray) Low-dimensional representation for each cell