class scvi.external.cellassign.CellAssignModule(n_genes, rho, basis_means, b_g_0=None, random_b_g_0=True, n_batch=0, n_cats_per_cov=None, n_continuous_cov=0)[source]

Bases: scvi.module.base._base_module.BaseModuleClass

Model for CellAssign.

n_genes : intint

Number of input genes


Number of input cell types

rho : TensorTensor

Binary matrix of cell type markers

basis_means : TensorTensor

Basis means numpy array

b_g_0 : Tensor | NoneOptional[Tensor] (default: None)

Base gene expression tensor. If None, use randomly initialized b_g_0.

random_b_g_0 : boolbool (default: True)

Override to enforce randomly initialized b_g_0. If True, use random default, if False defaults to b_g_0.

n_batch : intint (default: 0)

Number of batches, if 0, no batch correction is performed.

n_cats_per_cov : Iterable[int] | NoneOptional[Iterable[int]] (default: None)

Number of categories for each extra categorical covariate

n_continuous_cov : intint (default: 0)

Number of continuous covariates


generative(x, size_factor[, design_matrix])

Run the generative model.


Run the inference (recognition) model.

loss(tensors, inference_outputs, …[, n_obs])

Compute the loss for a minibatch of data.

sample(tensors[, n_samples, library_size])

Generate samples from the learned model.