scvi.nn.DecoderTOTALVI#
- class scvi.nn.DecoderTOTALVI(n_input, n_output_genes, n_output_proteins, n_cat_list=None, n_layers=1, n_hidden=256, dropout_rate=0, use_batch_norm=True, use_layer_norm=False, scale_activation='softmax', activation_function_bg='softplus')[source]#
Bases:
ModuleDecodes data from a latent space of
n_inputdimensionsn_outputdimensions.Uses a linear decoder.
- Parameters:
- n_input
int The dimensionality of the input (latent space)
- n_output_genes
int The dimensionality of the output (gene space)
- n_output_proteins
int The dimensionality of the output (protein space)
- n_cat_list
Iterable[int] (default:None) A list containing the number of categories for each category of interest. Each category will be included using a one-hot encoding
- use_batch_norm
float(default:True) Whether to use batch norm in layers
- use_layer_norm
float(default:False) Whether to use layer norm in layers
- scale_activation
Literal['softmax','softplus'] (default:'softmax') Activation layer to use for px_scale_decoder
- n_input
Attributes table#
Methods table#
|
The forward computation for a single sample. |
Attributes#
Methods#
- DecoderTOTALVI.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.scalerefers to the quantity 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_forerefers to foreground mean, whilerate_backrefers to background mean.scalerefers to foreground mean adjusted for background probability and scaled to reside in simplex.back_alphaandback_betaare the posterior parameters forrate_back.fore_scaleis the scaling factor that enforcesrate_fore>rate_back.- Parameters:
- Returns:
3-tuple (first 2-tuple
dict, lasttorch.Tensor) parameters for the ZINB distribution of expression