DAG-nabit is an interactive business strategy simulation dashboard designed to demonstrate the power of causal inference in marketing and customer targeting. It bridges the gap between simple A/B testing and advanced uplift modeling to help businesses optimize their strategy and maximize ROI.
- Customer Segmentation: God-mode view into 4 distinct customer types: Loyalists, Persuadables, Sleeping Dogs, and Lost Causes.
- Feature Distributions: Interactive histograms showing how observable customer features (age, activity, account value) correlate with hidden personas.
- Randomized A/B Test: Power analysis and conversion lift tracking for clean experiments.
- Selection Bias Demonstration: Run "Naive" tests that target only highly active users to see how selection bias inflates marketing metrics.
- The A/B Test Paradox: Visual contrast between true causal lift and biased observations.
- Propensity Score Matching (PSM): Rebalancing biased groups to mimic randomized trials.
- Double Machine Learning (DML): Leveraging ML to isolate treatment effects in complex, non-linear environments.
- Uplift Modeling: Predicting individual-level treatment effects to identify "Persuadables" and avoid "Sleeping Dogs."
- Frontend: Streamlit
- Analytics: Pandas, NumPy
- Visualization: Plotly
- Causal ML: Scikit-Learn (custom wrappers), logic for PSM and DML.
├── src/
│ ├── generators/ # Simulation engine & data generation
│ ├── experiments/ # A/B testing & Multi-arm bandit logic
│ └── causal_analysis/ # PSM, Double ML, and Uplift models
├── notebooks/ # Deep-dive walkthroughs & theory
├── tests/ # Unit tests (In Development)
├── app.py # Main Streamlit dashboard
└── brand_guideline.md # Design system and UI specs
- Python 3.10 or higher
- pip
-
Clone the repository:
git clone https://github.com/archeltaneka/DAG-nabit.git cd DAG-nabit -
Install dependencies:
pip install -r requirements.txt
-
Run the dashboard:
streamlit run app.py
The unit test suite is currently under development. You can run existing checks using:
python -m pytest tests/MIT License © 2025 Archel Taneka
PRs, suggestions, and issues are welcome.