You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for making this work public, it is super informative and helpful.
I would like to point out to that the PyMC3 example cannot recover R_t, as the gamma is not identifiable parameter. Changing the prior parameters for gamma also changes the estimates of R_t.
The reason for this is as currently defined, gamma has no influence on \theta and hence observation likelihood. In other words, the prior over gamma and the posterior will be identical. A fix would be to define random walk directly for R_t, for example
R_t = R_{t-1} + \sigma n_t
and then map this value to theta_t,
\theta_t = \gamma * (R_t - 1)
this way the likelihood becomes actual function of \gamma, and R_t, and both gamma and R_t are identifiable.
Alternatively, if you are worried about the negative values for R_t, one can constrain R_t to positive values with either softplus or exponential transform, e.g.
x_t = x_{t-1} + \sigma n_t R_t = f(x_t)
The text was updated successfully, but these errors were encountered:
dimarkov
changed the title
Mistake in the implementation of the generative model in PyMC3
R_t cannot be inferred using the PyMC3 implementation of the generative model
May 22, 2020
Hi, thanks for making this work public, it is super informative and helpful.
I would like to point out to that the PyMC3 example cannot recover R_t, as the gamma is not identifiable parameter. Changing the prior parameters for gamma also changes the estimates of R_t.
The reason for this is as currently defined, gamma has no influence on \theta and hence observation likelihood. In other words, the prior over gamma and the posterior will be identical. A fix would be to define random walk directly for R_t, for example
R_t = R_{t-1} + \sigma n_t
and then map this value to theta_t,
\theta_t = \gamma * (R_t - 1)
this way the likelihood becomes actual function of \gamma, and R_t, and both gamma and R_t are identifiable.
Alternatively, if you are worried about the negative values for R_t, one can constrain R_t to positive values with either softplus or exponential transform, e.g.
x_t = x_{t-1} + \sigma n_t
R_t = f(x_t)
The text was updated successfully, but these errors were encountered: