feat(bass): plotting methods for BassModel#2628
Draft
anevolbap wants to merge 1 commit into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2628 +/- ##
==========================================
+ Coverage 94.19% 94.22% +0.02%
==========================================
Files 100 101 +1
Lines 15384 15476 +92
==========================================
+ Hits 14491 14582 +91
- Misses 893 894 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5 tasks
5590d38 to
3d97174
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Description
Adds the four plotting methods from #2589 to
BassModel, built onpymc_marketing.plot.plot_curveso the visuals match the rest of the library:plot_adoption_curve: posterior new adopters per period with HDI, observed counts overlaid.plot_cumulative: cumulative adoption S-curve with HDI, observed cumulative overlaid.plot_decomposition: innovators and imitators per period on the left y-axis, cumulative adoption on a twin right y-axis. This is the dual-axes design requested in Dual y-axes for the "Innovators vs Imitators" plots in bass notebook #1706; that issue can close once the notebook adopts this method in Update Bass notebook to use BassModel class #2590.plot_peak: posterior of the peak adoption time viaarviz.plot_posterior.All functions live in a new
pymc_marketing.bass.plottingmodule and are exposed both as module functions and asplot_*methods onBassModel. Multi-product models render one subplot per product;product="A"selects a single one. Each function returns(fig, axes), somlflow.log_figureworks directly with the autolog workflow from #2624.The branch includes the
matplotlib<3.11pin from #2626 so CI can run; it drops out once that PR merges.Checklist
📚 Documentation preview 📚: https://pymc-marketing--2628.org.readthedocs.build/en/2628/