scvi.distributions.NegativeBinomialMixture#

class scvi.distributions.NegativeBinomialMixture(mu1, mu2, theta1, mixture_logits, theta2=None, validate_args=False)[source]#

Bases: Distribution

Negative binomial mixture distribution.

See NegativeBinomial for further description of parameters.

Parameters:
  • mu1 (Tensor) – Mean of the component 1 distribution.

  • mu2 (Tensor) – Mean of the component 2 distribution.

  • theta1 (Tensor) – Inverse dispersion for component 1.

  • mixture_logits (Tensor) – Logits scale probability of belonging to component 1.

  • theta2 (Tensor (default: None)) – Inverse dispersion for component 1. If None, assumed to be equal to theta1.

  • validate_args (bool (default: False)) – Raise ValueError if arguments do not match constraints

Attributes table#

arg_constraints

mean

Returns the mean of the distribution.

mixture_probs

support

Methods table#

get_normalized(key)

log_prob(value)

Log probability.

sample([sample_shape])

Sample from the distribution.

Attributes#

NegativeBinomialMixture.arg_constraints = {'mixture_logits': Real(), 'mixture_probs': HalfOpenInterval(lower_bound=0.0, upper_bound=1.0), 'mu1': GreaterThanEq(lower_bound=0), 'mu2': GreaterThanEq(lower_bound=0), 'theta1': GreaterThanEq(lower_bound=0)}#
NegativeBinomialMixture.mean[source]#
NegativeBinomialMixture.mixture_probs[source]#
NegativeBinomialMixture.support = IntegerGreaterThan(lower_bound=0)#

Methods#

NegativeBinomialMixture.get_normalized(key)[source]#
Return type:

Tensor

NegativeBinomialMixture.log_prob(value)[source]#

Log probability.

Return type:

Tensor

NegativeBinomialMixture.sample(sample_shape=None)[source]#

Sample from the distribution.

Return type:

Tensor