scvi.core.utils.DifferentialComputation

class scvi.core.utils.DifferentialComputation(model_fn, adata)[source]

Unified class for differential computation.

This class takes a function from a model like SCVI or TOTALVI and takes outputs from this function with respect to the adata input and computed Bayes factors as described in [Lopez18], [Xu19], or [Boyeau19].

Parameters
model_fn

Function in model API to get values from.

adata

AnnData setup with scvi

Methods

get_bayes_factors(idx1, idx2[, mode, …])

A unified method for differential expression inference.

scale_sampler(selection[, n_samples, …])

Samples the posterior scale using the variational posterior distribution.