scvelo.tl.VELOVI.get_expression_fit

VELOVI.get_expression_fit(adata=None, indices=None, gene_list=None, n_samples=1, batch_size=None, return_mean=True, return_numpy=None, restrict_to_latent_dim=None)

Returns the fitted spliced and unspliced abundance (s(t) and u(t)).

Parameters
adata : AnnData, None

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

indices : Sequence[int], None

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

gene_list : Sequence[str], None

Return frequencies of expression for a subset of genes. This can save memory when working with large datasets and few genes are of interest.

n_samples : int

Number of posterior samples to use for estimation.

batch_size : int, None

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

return_mean : bool

Whether to return the mean of the samples.

return_numpy : bool, None

Return a ndarray instead of a DataFrame. DataFrame includes gene names as columns. If either n_samples=1 or return_mean=True, defaults to False. Otherwise, it defaults to True.

Return type

ndarray, DataFrame

Returns

  • If n_samples > 1 and return_mean is False, then the shape is (samples, cells, genes).

  • Otherwise, shape is (cells, genes). In this case, return type is DataFrame unless return_numpy is True.