pymc-marketing  by pymc-labs

Bayesian marketing toolbox for MMM, CLV, and customer choice analysis

Created 4 years ago
1,158 stars

Top 33.0% on SourcePulse

GitHubView on GitHub
Project Summary

PyMC-Marketing is a Bayesian marketing analytics toolbox for Media Mix Modeling (MMM), Customer Lifetime Value (CLV), and Customer Choice Analysis (CSA). It empowers businesses to optimize marketing ROI and understand customer behavior through advanced statistical modeling, targeting marketing professionals and data scientists.

How It Works

The library leverages PyMC's probabilistic programming capabilities to implement sophisticated Bayesian models. For MMM, it incorporates adstock transformations, saturation effects, and time-varying parameters using Gaussian processes, allowing for flexible and interpretable analysis of marketing channel effectiveness. CLV models include various implementations like BG/NBD and Gamma-Gamma for both contractual and non-contractual settings. Customer Choice Analysis utilizes Multivariate Interrupted Time Series (MVITS) for product launch impact assessment.

Quick Start & Requirements

  • Installation: conda create -c conda-forge -n marketing_env pymc-marketing
  • Prerequisites: Python environment (conda recommended), PyMC. GPU support is available via PyMC backends.
  • Resources: Official installation documentation, Dockerfile available.

Highlighted Details

  • Bayesian MMM API supports custom priors, adstock, saturation functions, time-varying contributions, and causal identification via DAGs.
  • Offers multiple inference algorithms (NUTS samplers like BlackJax, NumPyro, Nutpie) and GPU acceleration.
  • CLV models cater to contractual/non-contractual and continuous/discrete transaction data.
  • MVITS models for Customer Choice Analysis handle saturated and unsaturated markets with market share and causal impact assessment.

Maintenance & Community

  • Supported by PyMC Labs.
  • Community resources include PyMC Discourse, Bayesian Discord, and MMM Hub Slack.
  • MMM-GPT AI assistant available for guidance.

Licensing & Compatibility

  • Licensed under Apache 2.0, free for commercial use.
  • Compatible with closed-source linking.

Limitations & Caveats

The library is actively developed, with new features constantly added. Users should refer to example notebooks for specific model implementations and usage details.

Health Check
Last Commit

13 hours ago

Responsiveness

1 day

Pull Requests (30d)
65
Issues (30d)
24
Star History
28 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.