-
Notifications
You must be signed in to change notification settings - Fork 252
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
add hdi_list
kwarg to plot_posterior_predictive
#1096
Conversation
hdi_list
kwarg to plot_posterior_predictive
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1096 +/- ##
=======================================
Coverage 95.56% 95.56%
=======================================
Files 39 39
Lines 4015 4018 +3
=======================================
+ Hits 3837 3840 +3
Misses 178 178 ☔ View full report in Codecov by Sentry. |
There is one notebook that needs to be updated mmm.plot_posterior_predictive(add_hdi=False, add_mean=False, add_gradient=True); # <-- Here See the changes in #1072 |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Should probably do the equivalent changes for |
Yeah, that is a good idea. Feel free to do here or in a separate PR. |
pymc_marketing/mmm/base.py
Outdated
hdi_list = [0.94] | ||
|
||
if hdi_list: | ||
# skipped if hdi_list is empty |
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.
No comment needed here
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.
# skipped if hdi_list is empty |
pymc_marketing/mmm/base.py
Outdated
if add_hdi: | ||
for hdi_prob, alpha in zip((0.94, 0.50), (0.2, 0.4), strict=True): | ||
if hdi_list is None: | ||
hdi_list = [0.94] |
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.
What happened with the 0.5 hdi? Are we removing that?
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.
We should keep it :)
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.
Oh, I maybe misinterpreted a previous reply as being in favour of copying arviz defaults of just the 0.94. But fair enough, I'll change the defaults back to [0.94, 0.5]
I think this should be ready to merge now. I'll add an issue for similar changes to related functions. |
"Pull Request Labeler" not passing. No idea what that is. |
Yeah, this is a new thing we are working on (not a blocker, once is green we can merge) |
@wd60622 the labeling is 🟢 🚀 ! |
I'll let you merge this when you are happy with everything @juanitorduz |
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.
LGTM
Description
Adds an optional kwarg to the
plot_posterior_predictive
function. Allows user to provide a list of hdi levels, e.g.[0.94]
. Default is the same as before,[0.94, 0.5]
.Related Issue
plot_posterior_predictive
#1041Checklist
Modules affected
Type of change
📚 Documentation preview 📚: https://pymc-marketing--1096.org.readthedocs.build/en/1096/