Skip to content

updating priors #115

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

Open
OriolAbril opened this issue Apr 5, 2021 · 5 comments
Open

updating priors #115

OriolAbril opened this issue Apr 5, 2021 · 5 comments
Labels
tracker id Issues used as trackers in the notebook update project, do not close!

Comments

@OriolAbril
Copy link
Member

File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/pymc3_howto/updating_priors.ipynb
Reviewers:

The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates

Known changes needed

Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.

General updates

ArviZ related

Changes for discussion

Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.

General updates

ArviZ related

Notes

Exotic dependencies

Computing requirements

@OriolAbril OriolAbril added tracker id Issues used as trackers in the notebook update project, do not close! high impact Notebooks with most visits on docs.pymc.io labels Apr 5, 2021
@cluhmann cluhmann removed the high impact Notebooks with most visits on docs.pymc.io label Jun 3, 2022
@symeneses
Copy link
Contributor

I would like to work on this issue 🙋🏽‍♀️

@OriolAbril
Copy link
Member Author

@symeneses moving the discussion from #394 (comment) to here.

The approach used in the updating priors notebook has multiple problems, the most critical one being that it uses univariate priors, which is generally not the case and can't be extended or used in other cases. I wrote a bit on this in one of my blogposts: https://oriolabrilpla.cat/python/arviz/pymc/xarray/xarray-einstats/2022/05/25/too-eager-reduction.html#Univariate-priors.

I'd recommend rewriting it not from scratch but nearly so that it uses prior_from_idata from the pymc-experimental library. It won't depend on pm.Interpolated anymore and should not be blocked until the issues with this are fixed. Let me know how it sounds. If you prefer it we could also leave this for another future PR.

@symeneses
Copy link
Contributor

I think we can update this notebook using pm.Interpolated if this is a good example of how to use pm.Interpolated, and create after a similar one using the approach you suggested. Otherwise, we can update the notebook as you suggested.

@OriolAbril
Copy link
Member Author

I don't think it is a good example of using pm.Interpolated as its use is intertwined with the prior updating. At least that is the impression I got from Discourse and some other issues, users don't really understand how Interpolated works and is being used here and they generally struggle updating the code to their own models due to this (which is problematic because they probably should not be adapting this to their own model and because they are also not even understanding what is going on either).

If we want an example of using Interpolated, maybe it could be to generate priors out of literature reviews or other more empirical knowledge. @aloctavodia do you maybe know an example of something like this?

@aloctavodia
Copy link
Member

Nothing from the top of my head... but I will try to think about an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracker id Issues used as trackers in the notebook update project, do not close!
Projects
Development

No branches or pull requests

4 participants