mirror of
https://github.com/wassname/pytorch-ts.git
synced 2026-08-08 11:25:10 +08:00
scale alpha so that the var stays the same
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user