-
Notifications
You must be signed in to change notification settings - Fork 332
Preparing plots and notebook for old API deprecation #2055
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
base: main
Are you sure you want to change the base?
Preparing plots and notebook for old API deprecation #2055
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2055 +/- ##
==========================================
- Coverage 92.49% 92.33% -0.16%
==========================================
Files 68 68
Lines 9364 9660 +296
==========================================
+ Hits 8661 8920 +259
- Misses 703 740 +37 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
why so many changes in a single PR 😢 |
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.
First pass
They are not many, purely docstring change you can ignore (I just move them to correct formatting). The files with changes are:
All under mmm folder :) |
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.
Pull Request Overview
This pull request adds new plotting functionality and utility functions to the MMM module, updates docstring formatting across multiple files, and includes comprehensive test coverage for the new features.
- Adds
build_contributionsutility function for processing posterior contribution data into wide DataFrames - Adds four new plotting methods:
residuals_over_time,residuals_posterior_distribution,posterior_distribution,waterfall_components_decomposition, andchannel_contribution_share_hdi - Converts docstring examples from REPL-style (
>>>) to code-block format for better rendering
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pymc_marketing/mmm/utils.py | Adds build_contributions function to aggregate and format contribution variables from posterior data |
| pymc_marketing/mmm/plot.py | Adds new plotting methods for residuals, posterior distributions, waterfall decomposition, and channel contribution shares |
| tests/mmm/test_utils.py | Adds comprehensive test suite for build_contributions function |
| tests/mmm/test_plot.py | Adds extensive test coverage for new plotting methods |
| pymc_marketing/mmm/multidimensional.py | Updates docstring formatting and fixes extend_idata logic in sample_posterior_predictive |
| pymc_marketing/model_builder.py | Converts docstring examples to code-block format |
| pymc_marketing/mmm/mmm.py | Converts docstring examples to code-block format |
| pymc_marketing/mmm/base.py | Converts docstring examples to code-block format |
| pymc_marketing/customer_choice/nested_logit.py | Converts docstring examples to code-block format |
| pymc_marketing/customer_choice/mnl_logit.py | Converts docstring examples to code-block format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Changed the prior_predictive method in MMMPlotSuite to accept a single variable name (str) instead of a list of variable names. Updated related logic and documentation to reflect this change for consistency and simplicity. Also added posterior_predictive_constant_data to idata groups in multidimensional.py.
Description
Kick-off API deprecation. Made a new notebook, in dev not visible to replicate current MMM example but with multidimensional. Only a few plots are missing.
Did additions in the plot API, and adjust some docs.
Related Issue
Checklist
pre-commit.ci autofixto auto-fix.📚 Documentation preview 📚: https://pymc-marketing--2055.org.readthedocs.build/en/2055/