scvi.model.AmortizedLDA.get_latent_representation

AmortizedLDA.get_latent_representation(adata=None, indices=None, batch_size=None, n_samples=5000)[source]

Converts a count matrix to an inferred topic distribution.

Parameters
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.

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

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

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

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

n_samples : intint (default: 5000)

Number of samples to take for the Monte-Carlo estimate of the mean.

Return type

DataFrameDataFrame

Returns

A n_obs x n_topics Pandas DataFrame containing the normalized estimate of the topic distribution for each observation.