Photo source: Campaign Creators on Unsplash
This project helps businesses identify customers most likely to respond positively to marketing offers. By using predictive analytics and targeted strategies, it boosts campaign effectiveness and return on investment (ROI). The solution includes response prediction, profit simulation, A/B testing planning, and deployment options.
- Predict which customers are likely to respond to a campaign.
- Focus efforts on high-value segments.
- Maximize revenue uplift while minimizing costs.
- Simulate business impact and measure performance.
- Deploy the solution for easy integration into marketing workflows.
- Data Processing: Cleaned, encoded, and feature-engineered customer behavior data.
- Modeling: Logistic Regression & Random Forest (AUC > 0.92).
- Threshold Tuning: F1 and Youden’s J used for optimal cutoff selection (0.46). (Campaign Targeting Strategy using data-backed thresholds)
- Business Uplift Simulation: Estimated uplift of $6.8K from targeted outreach.
- Cost-Benefit Analysis: ROI of 225% from campaign scenario; estimate net profit and ROI
- A/B Testing Design: Power analysis for pilot test planning.
- Deployment Tools:
- REST API scoring (
/scoring_api/api.py
) - Streamlit web app (
/dashboard/streamlit_app.py
)
- REST API scoring (
- Setup
git clone https://github.com/yourusername/marketing-analytics.git
cd marketing-analytics
pip install -r requirements.txt
- Run Scoring API
cd scoring_api
uvicorn api:app --reload
- Launch Streamlit App
cd dashboard
streamlit run streamlit_app.py
Marketing-analytics
│
├─ models/
│ └─ promo_model.pkl ← your serialized RandomForest
│
├─ scoring_api/
│ ├─ api.py ← FastAPI scoring service
│ └─ requirements.txt ← fastapi, uvicorn, scikit‑learn, pandas…
│
├─ dashboard/
│ ├─ streamlit_app.py ← Streamlit UI that calls api.py or loads model
│ └─ requirements.txt ← streamlit, requests, pandas…
│
├── data/ # raw data
├── docs/ # Documentation & glossary
│ ├─ project_summary.md
│ └─ glossary.md
│
├── index.ipynb
├── requirements.txt
└── README.md
- Best Model:
Random Forest
(CV AUC: 0.926) - Targeted Group Response Rate:
78.4%
vs Baseline42.9%
- Estimated Revenue Uplift:
$6.8K
- Campaign ROI:
225%
For clear definitions of key business and modeling terms used in this project, please refer to the Business Glossary and About Dataset