Skip to content
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 Bass Diffusion Model #1328

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add Bass Diffusion Model #1328

wants to merge 3 commits into from

Conversation

wd60622
Copy link
Contributor

@wd60622 wd60622 commented Jan 3, 2025

Description

Adding Bass Diffusion Model

Related Issue

Checklist

Modules affected

  • MMM
  • CLV
  • Customer Choice
  • Product Development

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

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

@github-actions github-actions bot added the enhancement New feature or request label Jan 3, 2025
@wd60622
Copy link
Contributor Author

wd60622 commented Jan 3, 2025

Here is a crude implementation of the Bass model. Feel free to take over @juanitorduz

I forget why I didn't wrap it in the ModelBuilder. Maybe I was just trying it out and familiarizing myself with the model. Maybe it will be straight forward but I remember having some concern.

As for the magnitude of m compared to the other parameters and NUTS, maybe a scaling constant can be used in the model. You might have some more ideas.

model = Bass(m_scaling=5000)

# Under the hood
m = m_scaling * Prior.create_variable(...)

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 38 lines in your changes missing coverage. Please review.

Project coverage is 94.58%. Comparing base (f80581b) to head (5172c61).

Files with missing lines Patch % Lines
pymc_marketing/bass.py 0.00% 38 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1328      +/-   ##
==========================================
- Coverage   95.31%   94.58%   -0.74%     
==========================================
  Files          47       48       +1     
  Lines        4912     4950      +38     
==========================================
  Hits         4682     4682              
- Misses        230      268      +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juanitorduz
Copy link
Collaborator

Thanks @wd60622 ! I will familiarize myself with the model and push it forward 🙌

@wd60622
Copy link
Contributor Author

wd60622 commented Jan 3, 2025

Sounds good! Thanks

I had the idea we could parameterize it as days/weeks/months from product launch making pooling across dims / products easier. I feel like that would be an interesting insight.

@juanitorduz juanitorduz self-assigned this Jan 3, 2025
@wd60622
Copy link
Contributor Author

wd60622 commented Jan 5, 2025

Visual produced from the main block:

bass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Bass Diffusion Model
2 participants