scale alpha so that the var stays the same

This commit is contained in:
Dr. Kashif Rasul
2020-04-06 11:38:35 +02:00
parent c1883d839c
commit 3c6bbf28d7
+2 -2
View File
@@ -136,8 +136,8 @@ class NegativeBinomialOutput(DistributionOutput):
mu, alpha = distr_args
if scale is not None:
mu *= scale
alpha /= scale
alpha = (1 - scale + mu*alpha)/(mu*scale*scale)
mu = mu*scale
n = 1.0 / alpha
p = mu * alpha / (1.0 + mu * alpha)