DecoderTOTALVI¶
-
class
scvi.models.modules.
DecoderTOTALVI
(n_input, n_output_genes, n_output_proteins, n_cat_list=None, n_layers=1, n_hidden=256, dropout_rate=0)[source]¶ Bases:
torch.nn.modules.module.Module
Decodes data from latent space of
n_input
dimensionsn_output
dimensions using a linear decoder- Parameters
n_input (
int
int
) – The dimensionality of the input (latent space)n_output_genes (
int
int
) – The dimensionality of the output (gene space)n_output_proteins (
int
int
) – The dimensionality of the output (protein space)n_cat_list (
Iterable
[int
],None
Optional
[Iterable
[int
]]) – A list containing the number of categories for each category of interest. Each category will be included using a one-hot encoding
- Returns
Methods Summary
forward
(z, library_gene, *cat_list)The forward computation for a single sample.
Methods Documentation
-
forward
(z, library_gene, *cat_list)[source]¶ The forward computation for a single sample.
Decodes the data from the latent space using the decoder network
Returns local parameters for the ZINB distribution for genes
Returns local parameters for the Mixture NB distribution for proteins
We use the dictionary px_ to contain the parameters of the ZINB/NB for genes. The rate refers to the mean of the NB, dropout refers to Bernoulli mixing parameters. scale refers to the quanity upon which differential expression is performed. For genes, this can be viewed as the mean of the underlying gamma distribution.
We use the dictionary py_ to contain the parameters of the Mixture NB distribution for proteins. rate_fore refers to foreground mean, while rate_back refers to background mean. scale refers to foreground mean adjusted for background probability and scaled to reside in simplex. back_alpha and back_beta are the posterior parameters for rate_back. fore_scale is the scaling factor that enforces rate_fore > rate_back.