--- id: pymc-marketing version: "1.0.0" license: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) license_treatment: permissive maintenance: active --- # pymc-marketing — Marketing Statistical Models in PyMC License: permissive · Maintenance: active · Downloads: 184.7K/mo ## What it is and what it does PyMC-Marketing is a Bayesian statistical modeling library for marketing analytics built on top of PyMC, ArviZ, and related tools. It provides domain-specific implementations of Marketing Mix Models, Customer Lifetime Value estimation, discrete choice models, and experimentation frameworks that allow marketers and analysts to quantify the causal impact of marketing channels and customer behaviors. The package is designed for practitioners who want to move beyond frequentist attribution methods and leverage Bayesian inference to incorporate prior knowledge, handle uncertainty explicitly, and make probabilistic predictions. It includes features like adstock transformations to model carryover effects, saturation functions to capture diminishing returns, time-varying intercepts and media efficiency, and causal identification tools via directed acyclic graphs. Models can be customized with domain-specific priors and likelihoods, and inference can be run on CPUs or GPUs via PyMC's backend options. Use it for: - Quantify the incremental impact of each marketing channel on sales or conversions using Bayesian MMM with carryover and saturation effects. - Estimate customer lifetime value distributions to inform acquisition budgets and retention strategies. - Analyze discrete choice behavior (e.g., MaxDiff surveys, product preferences) using Bayesian hierarchical choice models. - Test incrementality of marketing experiments with PIE (Predicted Incrementality by Experimentation) framework. - Model product adoption and diffusion curves using Bass Diffusion models for new product forecasting. - Incorporate causal domain knowledge via DAGs to identify confounders and improve model validity. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PyMC-Marketing provides Bayesian statistical models for marketing analytics, including Marketing Mix Modeling (MMM), Customer Lifetime Value (CLV), Customer Choice, Bass Diffusion, and Predicted Incrementality by Experimentation (PIE). Yes, if you need Bayesian marketing analytics and are comfortable with the PyMC ecosystem. The package is actively maintained, has no known vulnerabilities, uses a permissive license, and offers specialized tools for MMM and CLV that are difficult to assemble from scratch. Requires Python >= 3.12 and a substantial dependency stack; best suited for teams with statistical modeling experience or access to consulting support. ## Install pip install pymc-marketing uv add pymc-marketing poetry add pymc-marketing ## Installing pymc-marketing Before you install: Low install friction with a pure-Python wheel. Active maintenance with a release 7 days ago and ongoing commits. Requires Python >= 3.12 and depends on a large Bayesian stack (pymc, arviz, pytensor, numpy, pandas, scikit-learn, and others). License in practice: Apache License 2.0 is permissive; you may use, modify, and distribute this package freely in commercial and private projects, provided you include the license and attribute changes. Quickstart: pip install pymc-marketing import pymc_marketing from pymc_marketing.mmm import MMM # Create and fit a Marketing Mix Model model = MMM(data=your_data, adstock='geometric', saturation='logistic') model.fit() Requires Python >= 3.12. Fitting models requires sufficient memory for Bayesian sampling and may be computationally intensive depending on data size and model complexity. Verify before relying: - Whether optional extras (dag, pie) are commonly needed or if base installation covers most use cases - Typical model fitting time and computational requirements for datasets of different sizes - How well the package integrates with existing marketing analytics pipelines outside the PyMC ecosystem ## Package facts - License: Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 184.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags bayesian marketing mix modeling, customer lifetime value analysis, marketing attribution modeling, bayesian customer choice models, incrementality testing framework, media mix optimization, marketing analytics bayesian, bayesian-inference, marketing-analytics, causal-modeling [View on SkillFed](https://skillfed.io/packages/pymc-marketing) · [View on PyPI](https://pypi.org/project/pymc-marketing/)