pymc-devs / pymc-examples

Examples of PyMC models, including a library of Jupyter notebooks.
https://www.pymc.io/projects/examples/en/latest/
MIT License
259 stars 211 forks source link

Notebook Proposal : Time Series Modeling with HSGP: Baby Births Example #626

Closed juanitorduz closed 2 months ago

juanitorduz commented 5 months ago

Notebook proposal

Title: Time Series Modeling with HSGP: Baby Births Example

Why should this notebook be added to pymc-examples?

I recently published a blog post of this model Time Series Modeling with HSGP: Baby Births Example based on the great post https://avehtari.github.io/casestudies/Birthdays/birthdays.html by Aki Vehtari. I got good feedback and when talking with @bwengals , we believe it could be a nice addition to the example gallery.

Scope: My original post is very verbose as it was essentially written for myself as a future reference. Hence, we can have a condensed version. I also suggest we implement a simpler model as we want users to get an example of HSGP in the periodic and not periodic cases. Therefore, we can have a long-term trend GP, a periodic yearly GP and a ZeroSumNormal for the weekday seasonality. This is already a good baseline and we can add references for more complex models.

Suggested categories:

Related notebooks

Time Series Modeling with HSGP: Baby Births Example

References

https://avehtari.github.io/casestudies/Birthdays/birthdays.html by Aki Vehtari

juanitorduz commented 5 months ago

After very insightful discussions with @bwengals, we believe this notebook can have more ambitious objectives:

  1. Reference for how to use HSGP
  2. Case study which illustrates some of the issues that come up with HSGPs. This Birthdays example is a great vehicle for that.
  3. Illustrate Bayesian workflow, eda -> model building, and how to make a good model for a particularly complex data set.

This notebook will probably be a long one so we suggest working on self-contained iterations, i.e. after each point above is completed and passes all the requirements (pre-commit, typos, ...) we merge and continue with the next point in a different PR.

Any thoughts?

AlexAndorra commented 5 months ago

Great idea @juanitorduz ! That will also make our reviewing job easier ;)