-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Updated multilevel modeling to v4 #285
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 OriolAbril commented on 2022-02-27T21:59:59Z The date should be updated too. |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-02-27T22:00:00Z Line #1. coords = {"Level": ["Basement", "Floor"], "obs_id": np.arange(floor.size)}
There is no need anymore for "decoy" coordinates. Using fonnesbeck commented on 2022-02-27T22:29:12Z Sorry, not sure what you mean by decoy coordinates. Do they not have to be in the OriolAbril commented on 2022-02-27T22:47:13Z no,
With the improved Aesara capabilities and the refactors to shape/size/dims functionality done by Brandon and Michael (I think it was mostly the two of them) when annotating dimensions, we can use dimension names that are not in |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-02-27T22:00:01Z use constant/mutable things to get rid of warning. |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-02-27T22:00:01Z Line #8. sd_dist = pm.Exponential.dist(0.5, shape=2) Can this be fonnesbeck commented on 2022-02-27T22:32:40Z Unfortunately it is not compatible. |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-02-27T22:00:02Z This model doesn't look converged :/ cfonnesbeck commented on 2022-03-04T01:19:01Z Increased tuning seems to fix it. |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-02-27T22:00:03Z Adding predictions to the predictions group can be simplified to
pm.sample_posterior_predictive(contextual_effect_trace, predictions=True, extend_inferencedata=True);
fonnesbeck commented on 2022-02-27T22:42:11Z Unfortunately this does not seem to work. A OriolAbril commented on 2022-02-27T22:49:42Z this should add a cfonnesbeck commented on 2022-03-04T01:40:04Z OK, figured it out. |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-02-27T22:00:04Z you should also add yourself again, make sure the notebook is executed sequentially until the end and add the page footer cell |
Sorry, not sure what you mean by decoy coordinates. Do they not have to be in the View entire conversation on ReviewNB |
Unfortunately it is not compatible. View entire conversation on ReviewNB |
Unfortunately this does not seem to work. A View entire conversation on ReviewNB |
no,
With the improved Aesara capabilities and the refactors to shape/size/dims functionality done by Brandon and Michael (I think it was mostly the two of them) when annotating dimensions, we can use dimension names that are not in View entire conversation on ReviewNB |
this should add a View entire conversation on ReviewNB |
Increased tuning seems to fix it. View entire conversation on ReviewNB |
OK, figured it out. View entire conversation on ReviewNB |
OK, should be good to go now, unless there are further issues. |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-03-04T19:43:41Z can you use the mutable kwarg to get rid of the warning? |
View / edit / reply to this conversation on ReviewNB OriolAbril commented on 2022-03-04T19:43:42Z I would be nice to update the coordinate values here now that obs_id is no longer an index but maps directly to counties. I looked at the docstrings and it seems that only fonnesbeck commented on 2022-04-11T02:24:05Z Is there anything we can do about this now? OriolAbril commented on 2022-04-11T21:27:45Z use the cfonnesbeck commented on 2022-04-12T00:01:55Z Let's punt on this until |
/pre-commit run Trying to see if this fixes the ci job, you'll have to pull before doing the changes. |
I never can get pre-commit magic comment to work 🤷 |
Is there anything we can do about this now? View entire conversation on ReviewNB |
use the View entire conversation on ReviewNB |
Let's punt on this until View entire conversation on ReviewNB |
* Add guide on how to wrap a JAX function in a Aesara Op * Fix typos and reorder last sections * Fix reference paths * Simplify model and be more verbose in Op creation * Address review comments * Address more review comments * Fix more Aesara docs references * Use reference to Aesara index page * Update myst_nbs/case_studies/wrapping_jax_function.myst.md Co-authored-by: Oriol Abril-Pla <oriol.abril.pla@gmail.com>
* create truncated regression example * delete truncated regression example from main branch * create truncated regression example * delete truncated regression example from main branch * create truncated regression example * delete truncated regression example from main branch * initial commit * update link to pull request in Authors section * add tag `classification` * update authorship verbs * plot through xarray, using XrContinuousRV * add x axis labels * add xarray_einstats to watermark, and fix 'classification' as a tag, not a category Co-authored-by: Benjamin T. Vincent <drbenvincent@users.noreply.github.com>
Add *.DS_Store to .gitignore Co-authored-by: Benjamin T. Vincent <drbenvincent@users.noreply.github.com>
* create truncated regression example * delete truncated regression example from main branch * create truncated regression example * delete truncated regression example from main branch * create truncated regression example * delete truncated regression example from main branch * initial commit * obey the law in terms of numpy random number generation + az style * improvements to schematic figure * replace image with non transparent background * fix embedded image Co-authored-by: Oriol Abril-Pla <oriol.abril.pla@gmail.com> * fix embedded image - not sure why this didn't register before * address all review comments - change notebook tag - remove plt.tight_layout() - ax.legend() -> plt.legend() * make code cell visible * remove 2 unused lines * add explanation tag * add technical note re posterior predictive sampling * addressing Luciano's suggested edits * increase clarity of sentence in introduction * add another explanatory markdown cell on the effect posterior * fix typo Co-authored-by: Benjamin T. Vincent <drbenvincent@users.noreply.github.com> Co-authored-by: Oriol Abril-Pla <oriol.abril.pla@gmail.com>
* initial try * undo spacing error * specify location files * update paths * add exclude notebooks * missing notebooks * undo spacing
* updated notebook * run wit latest v2 version * fixed graphviz redering * partial resolution of pr comments * Add guide on how to wrap a JAX function in a Aesara Op (#302) * Add guide on how to wrap a JAX function in a Aesara Op * Fix typos and reorder last sections * Fix reference paths * Simplify model and be more verbose in Op creation * Address review comments * Address more review comments * Fix more Aesara docs references * Use reference to Aesara index page * Update myst_nbs/case_studies/wrapping_jax_function.myst.md Co-authored-by: Oriol Abril-Pla <oriol.abril.pla@gmail.com> * update twitter link (#314) * update Gaussian Mixture Model example with `pm.NormalMixture` (#310) * create truncated regression example * delete truncated regression example from main branch * create truncated regression example * delete truncated regression example from main branch * create truncated regression example * delete truncated regression example from main branch * initial commit * update link to pull request in Authors section * add tag `classification` * update authorship verbs * plot through xarray, using XrContinuousRV * add x axis labels * add xarray_einstats to watermark, and fix 'classification' as a tag, not a category Co-authored-by: Benjamin T. Vincent <drbenvincent@users.noreply.github.com> * add `*.DS_Store` to `.gitignore` (#315) Add *.DS_Store to .gitignore Co-authored-by: Benjamin T. Vincent <drbenvincent@users.noreply.github.com> * updated notebook * run wit latest v2 version * fixed graphviz redering * partial resolution of pr comments * reverted plot labels * restored plt labels * fixed arviz labels * fixed sampling warning * fixed authors Co-authored-by: Ricardo Vieira <28983449+ricardoV94@users.noreply.github.com> Co-authored-by: Oriol Abril-Pla <oriol.abril.pla@gmail.com> Co-authored-by: Abhishek K M <67158080+Sync271@users.noreply.github.com> Co-authored-by: Benjamin T. Vincent <b.t.vincent@dundee.ac.uk> Co-authored-by: Benjamin T. Vincent <drbenvincent@users.noreply.github.com>
* add bibtex reference for Rasmussen & Williams book * update the latest Mauna Loa C02 data
Should be clean now. |
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.
commented on the myst because it was easier, best to make the changes on from jupyter
These should be flagged, it's the check name that is not right, it finds "urls that should be sphinx cross-references" The one to the arviz homepage should be |
"# A Primer on Bayesian Methods for Multilevel Modeling\n", | ||
"\n", | ||
":::{post} 27 February, 2022\n", | ||
":tags: hierarchical, pymc.Data, pymc.Deterministic, pymc.Exponential, pymc.LKJCholeskyCov, pymc.Model, pymc.MvNormal, pymc.Normal\n", | ||
":tags: hierarchical, Data, Deterministic, Exponential, LKJCholeskyCov, Model, MvNormal, Normal\n", |
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.
":tags: hierarchical, Data, Deterministic, Exponential, LKJCholeskyCov, Model, MvNormal, Normal\n", | |
":tags: hierarchical model, case study\n", |
@@ -4,10 +4,11 @@ | |||
"cell_type": "markdown", | |||
"metadata": {}, | |||
"source": [ | |||
"(notebook_name)=\n", |
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.
"(notebook_name)=\n", | |
"(multilevel_modeling)=\n", |
related to #47 |
@fonnesbeck I know this is an old PR, but I was wondering if you made the model pngs added in this PR via latex or some other method? Thanks! |
Fixed models to work in v4.0.0b2 and added missing remote images as local files.
I don't like the new formulation of the early models as having independent means for floor and basement, but I can tackle that issue in a separate PR.
This should supersede #282