Closed ColtAllen closed 1 year ago
Can probably use a custom initial value for the priors if that's the problem.
I think that custom initial values can work.
However, why are the parameters in the initial evaluations 0? The starting values have their log values to be 0. Shouldn't the initial evaluations yield parameter values of 1?
This has caused a lot of confusion: the second dictionary contains the log-probabilities. We should write it explicitly in the error message
This has caused a lot of confusion: the second dictionary contains the log-probabilities. We should write it explicitly in the error message
I can create a beginner friendly issue in the PyMC repo later today
This has caused a lot of confusion: the second dictionary contains the log-probabilities. We should write it explicitly in the error message
I can create a beginner friendly issue in the PyMC repo later today
That would be good!
For sorting the issue, we need to know why is a = b = alpha = r = 1
invalid, and what would be a safe default instead. This could also mean that simple positive priors may be incorrect for this model?
For sorting the issue, we need to know why is
a = b = alpha = r = 1
invalid, and what would be a safe default instead. This could also mean that simple positive priors may be incorrect for this model?
Parameter values must be positive, but a
and b
are parameters of a beta distribution. Might work better to pool those priors. Here's some code I wrote in the past for this model:
https://github.com/ColtAllen/btyd/blob/main/btyd/models/beta_geo_model.py#L97
Regularizing the priors is certainly important, but the snippet above is failing already at the initial point. That means those values can't all be 1 for this dataset (or if they can, our logp implementation is too unstable)
In the logp
expression:
c4 = a / (b + x - 1)
logp = d1 + d2 + pt.log(c3 + c4 * pt.switch(x_zero, 1, 0))
c4
will throw a DIV/0 if b=1 and x=0. Should it be placed inside pt.switch()
?
In the
logp
expression:c4 = a / (b + x - 1) logp = d1 + d2 + pt.log(c3 + c4 * pt.switch(x_zero, 1, 0))
c4
will throw a DIV/0 if b=1 and x=0. Should it be placed insidept.switch()
?
That sounds right! Good catch
Cool, yeah sounds like that would solve it
I can spin a PR for this
Should probably fix this before the Official Release: