scvi.distributions.ZeroInflatedNegativeBinomial#
- class scvi.distributions.ZeroInflatedNegativeBinomial(total_count=None, probs=None, logits=None, mu=None, theta=None, zi_logits=None, scale=None, validate_args=False)[source]#
Bases:
NegativeBinomialZero-inflated negative binomial distribution.
One of the following parameterizations must be provided:
(1), (total_count, probs) where total_count is the number of failures until the experiment is stopped and probs the success probability. (2), (mu, theta) parameterization, which is the one used by scvi-tools. These parameters respectively control the mean and inverse dispersion of the distribution.
In the (mu, theta) parameterization, samples from the negative binomial are generated as follows:
\(w \sim \textrm{Gamma}(\underbrace{\theta}_{\text{shape}}, \underbrace{\theta/\mu}_{\text{rate}})\)
\(x \sim \textrm{Poisson}(w)\)
- Parameters:
total_count (
Tensor|None(default:None)) – Number of failures until the experiment is stopped.probs (
Tensor|None(default:None)) – The success probability.mu (
Tensor|None(default:None)) – Mean of the distribution.zi_logits (
Tensor|None(default:None)) – Logits scale of zero inflation probability.scale (
Tensor|None(default:None)) – Normalized mean expression of the distribution.validate_args (
bool(default:False)) – Raise ValueError if arguments do not match constraints
Attributes table#
Methods table#
Attributes#
- ZeroInflatedNegativeBinomial.arg_constraints = {'mu': Optional(GreaterThanEq(lower_bound=0)), 'scale': Optional(GreaterThanEq(lower_bound=0)), 'theta': Optional(GreaterThanEq(lower_bound=0)), 'zi_logits': Optional(Real())}#
- ZeroInflatedNegativeBinomial.support = IntegerGreaterThan(lower_bound=0)#