scvi.external.cellassign.CellAssignModule#
- 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:
VAE
Model for CellAssign.
- Parameters:
n_genes (
int
) – Number of input genesn_labels – Number of input cell types
rho (
Tensor
) – Binary matrix of cell type markersbasis_means (
Tensor
) – Basis means numpy arrayb_g_0 (
Tensor
|None
(default:None
)) – Base gene expression tensor. If None, use randomly initialized b_g_0.random_b_g_0 (
bool
(default:True
)) – Override to enforce randomly initialized b_g_0. If True, use random default, if False defaults to b_g_0.n_batch (
int
(default:0
)) – Number of batches, if 0, no batch correction is performed.n_cats_per_cov (
Iterable
[int
] |None
(default:None
)) – Number of categories for each extra categorical covariaten_continuous_cov (
int
(default:0
)) – Number of continuous covariates
Attributes table#
Methods table#
|
Run the generative model. |
|
Compute the loss. |
|
Sample from the posterior distribution. |
Attributes#
- CellAssignModule.training: bool#
Methods#
- CellAssignModule.generative(x, size_factor, batch_index, design_matrix=None, transform_batch=None)[source]#
Run the generative model.