Agent skill · marketing growth · aradotso
marketing-mix-modeling-end-to-end-pipeline
Build end-to-end Marketing Mix Models with adstock, saturation, OLS regression, and budget optimization in Python
Why this skill is useful
Adds a complete end-to-end pipeline with executable scripts for marketing mix modeling, including geometric adstock and budget optimization that the AI cannot generate on its own.
What it needs
Requires matplotlib, numpy, pandas, python3, scipy, seaborn, statsmodels installed locally. About 8k tokens when loaded. Last updated 2026-08-05. 8 stars on the source repository.
What this skill does
Marketing Mix Modeling End-to-End Pipeline Skill by ara.so — Marketing Skills collection. This project provides a complete Marketing Mix Modeling (MMM) pipeline in Python that transforms raw marketing spend data into actionable channel insights and optimized budget allocations. It includes geometric adstock transformation, Hill saturation curves, OLS regression modeling, and constrained budget optimization. Installation Key Dependencies: pandas — data manipulation numpy — numerical operations statsmodels — OLS regression scipy — optimization algorithms matplotlib / seaborn — visualization Project Structure Core Transformations 1. Geometric Adstock Models the carryover effect of advertising — this week's exposure includes decayed contributions from previous weeks. Implementation (src/adstock.py): Apply to DataFrame: 2. Hill Saturation Models diminishing returns — the first dollar spent is more effective than the millionth. Implementation (src/saturation.py): Apply After Adstock (Order Matters!): OLS Regression Model Training the Model Implementation (src/model.py): Extract Coefficients & ROI Budget Optimization Find the optimal budget allocation to maximize revenue under a fixed total budget constraint. Implementation (src/optimizer.py): Complete Workflow Common Patterns Pattern 1: Sensitivity Analysis Test how different adstock/saturation parameters affect model fit: Pattern 2: Time-Based Validation Split data into train/test periods: Pattern 3: Channel Contribution Decomposition Break down revenue into channel contributions + baseline: Troubleshooting Issue: Low R² Solution: Check for: Missing transformations (ensure adstock → saturation order) Incorrect parameter values (theta too low, alpha misaligned with spend scale) Missing control variables Issue: Negative Coefficients Solution: Indicates potential multicollinearity or wrong transformation direction. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aradotso/marketing-mix-modeling-end-to-end-pipeline