Skip to content

About

Bayesian Commercial Decision Engine: Google Meridian MMM, SHAP explainability, BG/NBD Customer Lifetime Value, and distributed Apache Spark churn pipelines.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

Bayesian Commercial Decision Engine: Google Meridian MMM, Probabilistic CLV & Distributed ML

Language Bayesian MMM Probabilistic CLV Big Data Deliverables License

Modern commercial decision engines require rigorous econometric modeling: Bayesian media attribution, probabilistic customer lifetime value, and cost-sensitive churn classification.


📌 Executive Summary

Superficial marketing analytics relies on last-click attribution, heuristic customer segmentation, and uncalibrated churn alerts, generating massive capital misallocation.

This repository implements a four-tier quantitative marketing engineering framework bridging Bayesian econometrics, probabilistic customer modeling, and distributed machine learning.

Across a $10.1M media budget, the Bayesian optimization engine disproved naive ROAS metrics, unlocking +$419K in incremental revenue by reallocating spend from saturated channels to high-marginal-ROI drivers.


🏛️ Analytical Framework Architecture

                    QUANTITATIVE MARKETING SUITE
                                 │
         ┌───────────────────────┼───────────────────────┐
         ▼                       ▼                       ▼
┌──────────────────┐    ┌──────────────────┐    ┌──────────────────┐
│  Bayesian MMM &  │    │  Probabilistic   │    │  Cost-Sensitive  │
│   Optimization   │    │   CLV Modeling   │    │  Churn Modeling  │
│(Project_colombini│    │ (HW2_fcolombini4)│    │(HW1 & HW3 Spark) │
└────────┬─────────┘    └────────┬─────────┘    └────────┬─────────┘
         │                       │                       │
         ▼                       ▼                       ▼
Google Meridian Bayesian  BG/NBD + Gamma-Gamma   Scikit-Learn & PySpark
Adstock & Hill Curves     14-Table FMCG Schema   Asymmetric Cost Matrix
mROI Budget Reallocation Survival Probabilities  Distributed Assembly
         │                       │                       │
         └───────────────────────┼───────────────────────┘
                                 ▼
                    EXECUTIVE DECISION REPORTS
         Vector Executive Presentations & Notebook Evidence

The codebase progresses from single-customer behavioral economics to enterprise-scale distributed data pipelines processing millions of interaction logs.


🔬 Core Quantitative Modules

1. Bayesian Marketing Mix Modeling & Budget Optimization (Project_fcolombini4)

2. Customer Lifetime Value & BTYD Modeling (HW2_fcolombini4)

  • Probabilistic Spend Engines (HW2_fcolombini4/HW2.py): Combines Beta-Geometric / Negative Binomial Distribution (BG/NBD) transaction processes with Gamma-Gamma monetary value modeling.
  • Relational FMCG Database: Integrates 14 distinct enterprise entities documenting transactions, discounts, price changes, and support tickets via [HW2_fcolombini4/data/ER Diagram.md](HW2_fcolombini4/data/ER Diagram.md).
  • Customer Segmentation: Calculates survival probabilities $P(\text{Active})$, expected transaction frequencies, and margin concentration curves.
  • Deliverables: Methodological whitepaper HW2_fcolombini4/CLV_BG_NBG.pdf and executive deck HW2_fcolombini4/HW2_Presentation.pdf.

3. Cost-Sensitive Churn Prediction (HW1_fcolombini4)

  • Asymmetric Loss Functions (HW1_fcolombini4/HW1_starter_code.py): Calibrates classification thresholds against true financial payoff matrices rather than arbitrary 0.5 cutoffs.
  • Retention Trade-offs: Balances false-negative attrition damage against the commercial cost of unnecessary retention incentives.
  • Deliverable: Technical evaluation report HW1_fcolombini4/HW1_ChurnPrediction.pdf.

4. Distributed Big Data Churn Pipeline with Apache Spark (HW3_fcolombini4)


📊 Empirical Budget Optimization Matrix

Budget optimization results extracted from Google Meridian Bayesian model fit:

Channel Historical Spend Optimized Spend Spend Delta Historical Revenue Optimized Revenue mROI Status
Google Display $90,000 $50,000 -44.4% $233,731 $184,774 1.65 Saturated / Cut
Meta Facebook $7,460,000 $8,160,000 +9.4% $24,745,710 $26,335,322 2.21 Under-invested
Meta Instagram $2,530,000 $1,850,000 -26.9% $5,275,156 $4,131,028 1.79 Rebalanced
Meta Other $20,000 $30,000 +50.0% $106,339 $129,128 2.08 High Potential

🛠️ Environment & Reproduction

Each module maintains isolated execution scripts and dependencies:

# 1. Marketing Mix Modeling (Google Meridian)
cd Project_fcolombini4
pip install -r requirements.txt
python src/modeling.py

# 2. Customer Lifetime Value (BTYD / Lifetimes)
cd ../HW2_fcolombini4
python HW2.py

# 3. Apache Spark Churn Pipeline
cd ../HW3_fcolombini4
spark-submit HW3_starter_code.py

Author: Francesco Colombini
GitHub Profile · LinkedIn

About

Bayesian Commercial Decision Engine: Google Meridian MMM, SHAP explainability, BG/NBD Customer Lifetime Value, and distributed Apache Spark churn pipelines.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages