-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update Pymc3_tips_and_heuristics notebook #4036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Check out this pull request on Review Jupyter notebook visual diffs & provide feedback on notebooks. Powered by ReviewNB |
View / edit / reply to this conversation on ReviewNB twiecki commented on 2020-07-30T07:15:38Z heuristics |
View / edit / reply to this conversation on ReviewNB twiecki commented on 2020-07-30T07:15:39Z problems, regions, to sample from. Also, can you try and see what happens without ADVI init? AmitKus commented on 2020-08-01T05:09:52Z Without ADVI, it takes 20X longer for the same settings and some chains contain only diverging samples. AmitKus commented on 2020-08-01T05:12:25Z Auto-assigning NUTS sampler... Initializing NUTS using jitter+adapt_diag... Multiprocess sampling (4 chains in 4 jobs) NUTS: [mu_phi, theta, tau_c, tau_h, beta1, beta0] 100.00% [6000/6000 1:06:22<00:00 Sampling 4 chains, 1,001 divergences] Sampling 4 chains for 500 tune and 1_000 draw iterations (2_000 + 4_000 draws total) took 3984 seconds.
|
View / edit / reply to this conversation on ReviewNB twiecki commented on 2020-07-30T07:15:39Z simulated |
View / edit / reply to this conversation on ReviewNB twiecki commented on 2020-07-30T07:15:40Z also try without ADVI init. AmitKus commented on 2020-08-01T05:10:52Z Similar story without ADVI here too. Sampling takes an order of magnitude longer. AmitKus commented on 2020-08-01T05:11:33Z Sampling 4 chains for 500 tune and 1_000 draw iterations (2_000 + 4_000 draws total) took 3015 seconds. There were 41 divergences after tuning. Increase
|
View / edit / reply to this conversation on ReviewNB twiecki commented on 2020-07-30T07:15:41Z can you update to theano 1.0.5 and rerun? those warnings should disappear. AmitKus commented on 2020-08-01T05:13:39Z Fixed this and all the other suggestions above. Thanks. |
Since this notebook is being updated, it should probably be renamed. Its not a general notebook about PyMC3 tips, as the name implies; Its a very specific case study of CAR modeling. |
How about simply renaming it to conditional-autoregressive-model.ipynb? |
Without ADVI, it takes 20X longer for the same settings and some chains contain only diverging samples. View entire conversation on ReviewNB |
Similar story without ADVI here too. Sampling takes an order of magnitude longer. View entire conversation on ReviewNB |
Sampling 4 chains for 500 tune and 1_000 draw iterations (2_000 + 4_000 draws total) took 3015 seconds. There were 41 divergences after tuning. Increase
View entire conversation on ReviewNB |
Auto-assigning NUTS sampler... Initializing NUTS using jitter+adapt_diag... Multiprocess sampling (4 chains in 4 jobs) NUTS: [mu_phi, theta, tau_c, tau_h, beta1, beta0] 100.00% [6000/6000 1:06:22<00:00 Sampling 4 chains, 1,001 divergences] Sampling 4 chains for 500 tune and 1_000 draw iterations (2_000 + 4_000 draws total) took 3984 seconds.
View entire conversation on ReviewNB |
Fixed this and all the other suggestions above. Thanks. View entire conversation on ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all good now, thanks @AmitKus !
Good idea: let's just rename it conditional-autoregressive-model
👍
Also, don't forget to run black_nbconvert`, as per the style guide 😉
I remember last time when I was updating the notebook, inference without ADVI is pretty problematic - I think you should try more informative prior. Also, since you are renaming the file, you should do a grep and rename other places where we reference the name (mostly in the doc set up) |
9237d75
to
d01cc98
Compare
Codecov Report
@@ Coverage Diff @@
## master #4036 +/- ##
=======================================
Coverage 86.82% 86.82%
=======================================
Files 88 88
Lines 14154 14154
=======================================
Hits 12289 12289
Misses 1865 1865 |
View / edit / reply to this conversation on ReviewNB junpenglao commented on 2020-08-10T07:23:24Z Change title to "Conditional Autoregressive (CAR) model" |
07032c3
to
72e7464
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @AmitKus, looking good now! Last necessary changes I think:
- Did you look for other places where the old NB name was used and replaced it with the new name, as @junpenglao suggested? The references will probably be concentrated in the docs set-up.
- I think the cell with all the data is overcrowded and should be replaced (see my comment below).
- Don't forget to run
black_nbconvert
when the NB is ready, as explained in the style guide.
View / edit / reply to this conversation on ReviewNB AlexAndorra commented on 2020-08-12T15:53:58Z I think it might be worse putting all this data in a CSV on the repo, and loading this CSV here. That way, this cell will be dedicated to data loading and transformations and will gain in clarity IMO |
23322e9
to
0ce336a
Compare
2) Updated the notebook to follow the consistent style 3) Use arviz functions directly for plotting on inference data Fromat the notebook in Black-format Minor formatting minor change to execute last cell Minor text changes. Renaming file update the filename in the doc: PyMC3_tips_and_heuristic.ipynb to conditional-autoregressive-model.ipynb Minos change to remove .ipynb from the name Move conditional-autoregressive-mode.ipynb from tutorial "How-To" to examples "Gaussian Processes"
0ce336a
to
86a684d
Compare
…rd-coded in conditional-autoregressive-model.ipynb
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all good now, thanks a lot @AmitKus !
Thank your for opening a PR!
Depending on what your PR does, here are a few things you might want to address in the description: