Skip to content

feat(bass): plotting methods for BassModel#2628

Draft
anevolbap wants to merge 1 commit into
pymc-labs:mainfrom
anevolbap:feat/2589-bass-plots
Draft

feat(bass): plotting methods for BassModel#2628
anevolbap wants to merge 1 commit into
pymc-labs:mainfrom
anevolbap:feat/2589-bass-plots

Conversation

@anevolbap

@anevolbap anevolbap commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Related Issue

Description

Adds the four plotting methods from #2589 to BassModel, built on pymc_marketing.plot.plot_curve so the visuals match the rest of the library:

All functions live in a new pymc_marketing.bass.plotting module and are exposed both as module functions and as plot_* methods on BassModel. Multi-product models render one subplot per product; product="A" selects a single one. Each function returns (fig, axes), so mlflow.log_figure works directly with the autolog workflow from #2624.

The branch includes the matplotlib<3.11 pin from #2626 so CI can run; it drops out once that PR merges.

Checklist

  • Checked that the pre-commit linting/style checks pass
  • Included tests that prove the fix is effective or that the new feature works
  • Added necessary documentation (docstrings and/or example notebooks) using numpydoc format

📚 Documentation preview 📚: https://pymc-marketing--2628.org.readthedocs.build/en/2628/

@github-actions github-actions Bot added tests Bass model Dealing with the Bass Defusion model customer choice Related to customer choice module enhancement New feature or request plots priority: medium labels Jun 12, 2026
@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.91304% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.22%. Comparing base (649547e) to head (3d97174).

Files with missing lines Patch % Lines
pymc_marketing/bass/plotting.py 98.73% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anevolbap anevolbap force-pushed the feat/2589-bass-plots branch from 5590d38 to 3d97174 Compare June 12, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bass model Dealing with the Bass Defusion model customer choice Related to customer choice module enhancement New feature or request plots priority: medium tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plotting methods for BassModel

1 participant