Skip to content

NegativeBinomialDecoder

latent.modules.decoder.NegativeBinomialDecoder

Decoder with negative binomial reconstruction loss. Uses size factors to deal with count data.

__init__(self, x_dim, name='nb_decoder', loss_name='nb_loss', hidden_units=[128, 128], initializer='glorot_normal', dispersion='gene', **kwargs) special

Parameters:

Name Type Description Default
x_dim int

Integer indicating the number of dimensions in the input data.

required
name str

String indicating the name of the model.

'nb_decoder'
hidden_units Iterable[int]

Number of hidden units in DenseStack. If set to None the model skips the DenseStack and reduces to a linear decoder (Svensson 2020).

[128, 128]
loss_name str

String indicating the name of the loss.

'nb_loss'
initializer Union[str, Callable]

Initializer for the kernel weights matrix (see keras.initializers)

'glorot_normal'
dispersion Union[Literal['gene', 'cell-gene', 'constant'], float]

One of the following:

  • 'gene' - dispersion parameter of NB is constant per gene across cells
  • 'cell-gene' - dispersion can differ for every gene in every cell
  • 'constant' - dispersion is constant across all genes and cells
  • float - numeric value of fixed dispersion parameter
'gene'
**kwargs

Other arguments passed on to DenseStack.

{}