Dependent density notebook update#706
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
View / edit / reply to this conversation on ReviewNB jessegrabowski commented on 2024-09-28T05:36:17Z Line #9. beta = pm.Normal("beta", 0.0, 5.0, dims=("one", "K"))
I quite dislike this |
|
View / edit / reply to this conversation on ReviewNB jessegrabowski commented on 2024-09-28T05:36:18Z Line #10. x = pm.Data("x", std_range)
Add dims? |
|
View / edit / reply to this conversation on ReviewNB jessegrabowski commented on 2024-09-28T05:36:19Z Remove references to PyMC3 here |
|
View / edit / reply to this conversation on ReviewNB jessegrabowski commented on 2024-09-28T05:36:19Z Line #4. mu = pm.Deterministic("mu", gamma + x @ delta)
Same comment as above,
Also mu is missing dims |
|
View / edit / reply to this conversation on ReviewNB jessegrabowski commented on 2024-09-28T05:36:20Z Line #4. obs = pm.NormalMixture("obs", w, mu, tau=tau, observed=y)
dims on obs (and y) |
|
View / edit / reply to this conversation on ReviewNB jessegrabowski commented on 2024-09-28T05:36:21Z Looks like every draw diverged. Going to need to tune this to make it work with NUTS. |
|
Made some comments -- there are a few references to PyMC3 that need to be removed, plus a lot of nitpicks. The biggest problem is in the sampling. Every draw is divergent :( Maybe try nutpie? |
|
Oof, totally missed the divergences. Odd that the resulting fit was so good. I tried nutpie and numpyro, but it does not seem to like the stick-breaking piece (even after fixing the outer products). Works okay with Metropolis, so for expediency I'm sticking with this. |
|
View / edit / reply to this conversation on ReviewNB jessegrabowski commented on 2024-09-30T14:47:46Z typo: September 2024
|
|
Random question: we have |
|
We would have to reframe the problem somewhat, as |
|
Ok. That doesn't sound worth it? I was just curious. |
zaxtax
left a comment
There was a problem hiding this comment.
Aside from a small typo this looks LGTM
| $$w_i\ |\ x = v_i\ |\ x \cdot \prod_{j = 1}^{i - 1} (1 - v_j\ |\ x).$$ | ||
|
|
||
| For the LIDAR data set, we use independent normal priors $\alpha_i \sim N(0, 5^2)$ and $\beta_i \sim N(0, 5^2)$. We now express this this model for the conditional mixture weights using `PyMC3`. | ||
| For the LIDAR data set, we use independent normal priors $\alpha_i \sim N(0, 5^2)$ and $\beta_i \sim N(0, 5^2)$. We now express this this model for the conditional mixture weights using `PyMC`. |
1bc9168 to
80f26d4
Compare
|
@zaxtax Thanks! Looks like it needs to be re-approved after the fix. |
|
Is this ready, right? |
|
I don't know--its a year old now! Let me check and update as needed. |
|
@aloctavodia yes, it appears to work. I will merge. |
Updated code to v5, sampling to NUTS
📚 Documentation preview 📚: https://pymc-examples--706.org.readthedocs.build/en/706/