Skip to content

Added code for the blog post draft on Bayesian MMM with PyMC #1761

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

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

Conversation

SalK91
Copy link

@SalK91 SalK91 commented Jun 14, 2025

Description

This PR adds a tutorial notebook demonstrating how to implement a Bayesian Media Mix Model using PyMC.

  • The notebook walks through:
    • Applying adstock transformation and Hill Function
    • Building a Bayesian regression model using PyMC
    • Interpreting media channel effects and model outputs

The notebook is intended as a companion to a future blog post, but can be reviewed independently.

Related Issue

  • Closes #
  • Related to internal blog content discussion with @dr. Juan Camilo Orduz

Checklist


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

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added the docs Improvements or additions to documentation label Jun 14, 2025
Copy link
Collaborator

@juanitorduz juanitorduz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! @SalK91 Thank you for opening this PR. Here are some comments:

  • This is a PyMC pure model and the docs of this repository are intended to showcase how to use PyMC-Marketing, so you should use it instead of pure PyMC if you want this PR to be reviewed.

  • Isn't this example already treated in https://www.pymc-marketing.io/en/latest/notebooks/mmm/mmm_case_study.html ? What is the difference? Maybe you can take the existing notebook of this example and extended.

Thanks

Copy link
Collaborator

@juanitorduz juanitorduz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to include all these files (readme, png and requirements)

@@ -0,0 +1,63 @@
# Bayesian Media Mix Modeling
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for an additional readme


```bash
python -m pip install --upgrade pip setuptools wheel --quiet
python -m pip install -r requirements.txt --quiet
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should never use pip to install pymc 🙏 (but this readme should not be part of the PR)

@@ -0,0 +1,176 @@
anyio==3.7.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this as the examples should work with pymc-marketing and minimal dependencies (why beautifulsoup4 for example?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants