Skip to content

Welcome to mmm-eval

A comprehensive evaluation framework for Marketing Mix Modeling (MMM) frameworks.

Quick Start

Get started with mmm-eval in just a few steps:

1. Install mmm-eval

pip install git+https://github.com/mutinex/mmm-eval.git

2. Prepare your data

Your data should include: - Date column - Target variable (e.g., sales, conversions) - Media spend columns - Revenue column (for ROI calculations)

Example data structure:

date,sales,revenue,tv_spend,digital_spend
2023-01-01,1000,7000,5000,2000
2023-01-02,1200,8000,5500,2200

3. Create a configuration

For PyMC-Marketing:

from pymc_marketing.mmm import MMM, GeometricAdstock, LogisticSaturation
from mmm_eval.configs import PyMCConfig

model = MMM(
    date_column="date",
    channel_columns=["tv_spend", "digital_spend"],
    adstock=GeometricAdstock(l_max=4),
    saturation=LogisticSaturation()
)

config = PyMCConfig.from_model_object(
    model_object=model,
    revenue_column="revenue"
)

4. Run evaluation

mmm-eval --input-data-path data.csv --config-path config.json --output-path ./output --framework pymc-marketing

Documentation

Getting Started

User Guide

Examples

Development

  • Contributing - How to contribute to mmm-eval.
  • Setup - Development environment setup.
  • Testing - Testing practices and procedures.

Features

Multi-Framework Support

  • PyMC-Marketing: Bayesian MMM framework using PyMC
  • Google Meridian: Google's MMM framework
  • Extensible: Easy to add new frameworks

Comprehensive Testing

  • Accuracy Tests: MAPE, RMSE, R-squared metrics
  • Cross-Validation: Time series cross-validation
  • Refresh Stability: Model stability over time
  • Performance Tests: Computational efficiency metrics

Standardized Evaluation

  • Consistent metrics across frameworks
  • Reproducible results
  • Industry-standard validation approaches

Quick Navigation

Getting Started

Get up and running with mmm-eval in minutes.

User Guide

Learn how to use mmm-eval effectively.

Examples

Practical examples and use cases.

Development

Contribute to mmm-eval development.