TOTALVI.posterior_predictive_sample(adata=None, indices=None, n_samples=1, batch_size=None, gene_list=None, protein_list=None)[source]

Generate observation samples from the posterior predictive distribution.

The posterior predictive distribution is written as \(p(\hat{x}, \hat{y} \mid x, y)\).

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.

n_samples : intint (default: 1)

Number of required samples for each cell

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

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

gene_list : Sequence[str] | NoneOptional[Sequence[str]] (default: None)

Names of genes of interest

protein_list : Sequence[str] | NoneOptional[Sequence[str]] (default: None)

Names of proteins of interest

Return type



x_new : ndarray tensor with shape (n_cells, n_genes, n_samples)