-
Notifications
You must be signed in to change notification settings - Fork 339
Special priors #1939
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
Special priors #1939
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1939 +/- ##
==========================================
+ Coverage 92.00% 92.01% +0.01%
==========================================
Files 66 67 +1
Lines 7853 7932 +79
==========================================
+ Hits 7225 7299 +74
- Misses 628 633 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks @daniel-saunders-phil ! This looks great! can you please add this new module here: https://github.com/pymc-labs/pymc-marketing/blob/main/docs/source/api/index.md so that is rendered in the docs? After that we can merge this one 🙏 |
juanitorduz
left a comment
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.
Just add this new module to the docs :)
|
My two recommendations would be:
I feel we could get from cc: @williambdean |
Thanks Carlos!
|
|
Added this issue to track future changes around inheritance #1941 |
|
Thanks @daniel-saunders-phil, I think this is a great contribution and we can showcase it in some example notebooks! We can iterate in the class and structures of these distributions in the future 💪 |
This is the code implementation of that positive-constrained prior that works well for hierarchies that I was telling a few folks about. Wrote up the rough draft in this post and finally got a production-ready version coded up.
We have to implement as it's own class instead of using the Prior class because it doesn't correspond to any pymc distribution and you cannot build it out of the transformations permitted by the Prior class.
I'm curious what people think of the strategy of introducing
special_priors.py. I think there are quite a few odd distributions (Non-centered laplace for seasonality is sometimes way more efficient than centered laplace) that don't match the logic of the Prior class very well but would be nice to have in marketing projects. If we want to keep push that route, it might be nice to set up a base class with some abstract methods so we know what is required of all special priors.In a future PR, I'll update the multi-dimensional notebook to use this class.
📚 Documentation preview 📚: https://pymc-marketing--1939.org.readthedocs.build/en/1939/