VAEMixin.get_marginal_ll(adata=None, indices=None, n_mc_samples=1000, batch_size=None)[source]

Return the marginal LL for the data.

The computation here is a biased estimator of the marginal log likelihood of the data. Note, this is not the negative log likelihood, higher is better.

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_mc_samples : intint (default: 1000)

Number of Monte Carlo samples to use for marginal LL estimation.

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

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

Return type