Thanks for the great tool. I had a subtle question about the the scVI model. In supplementary note 3 the mean of the ZINB (ignoring the zero inflated portion) comes to r * \lambda * \frac{p}{p+1}. Given that the (r, \lambda, \frac{p}{p+1}) = (\rho^g_n, l_n, \theta) doesn’t this imply the mean of the ZINB is \rho^g_n * l_n * \theta? This is different form the method section of the main text (Fast inference via stochastic optimization) that states the mean is l_n * \rho^g_n, (no \theta).
Hey,
I believe l_n is the scaling factor, just like p/(1-p) is the scale parameter in the supplementary and λ is just a general scalar there.
θ is the dispersion parameter and its a kinda another way to represent the ZINB.
So, just remove λ and θ from that equation you made. rest of things are fine
Hi, thanks for the response!
Sorry for the typo in my post, it should be \frac{p}{1-p} instead of \frac{p}{p+1}.
I see that l_n and \frac{p}{1-p} are scaling factors and the gamma distribution has a scaling property (if X \sim \mathrm{Gamma}(\alpha, \theta), for c> 0 then cX \sim \mathrm{Gamma}(\alpha, c\,\theta)), so they are interchangeable. But if the the model is described as such
then ist it implied that the mean will be \theta*l_n*\rho_n^g and not just l_n * \rho_n^g? irrespective of how the ZINB is parameterised.
Its a bit confusing indeed.
It depended on what is θ, if its the dispersion parameter than it is not part of the mean calculation showed, if it is a scalar like you are showing, then yes it should be part of the mean calculation of the Gamma distribution.
However I think the author wanted to give a sense that the distribution has a close form based on the reference he gave in the “Fast inference via stochastic optimization” part and perhaps that doesn’t 100% match the previous paragraphs.
To bring more explanation in the supplement the definition is the logits total_counts convention for a negative binomial (r, p and lambda instead of rho, theta and l_n). See our code on how this changes computation:
scvi-tools/src/scvi/distributions/_negative_binomial.py at main · scverse/scvi-tools · GitHub.
To make it very short, theta is the mean variance relationship and the mean is independent of theta.