Customer Intelligence & Banner Ranking Engine
Behavioral segmentation, calibrated propensity scoring, LambdaRank personalization, and CUPED A/B design across 42.4M eCommerce events.
42.4M / 3.02M
Events / Users Processed
165,647 items across 239 category banners
0.682 vs 0.519
Churn ROC-AUC Lift
5.5x forward purchase R² lift over RFM
+$310,266
Simulated NBA Value
Net incremental EV over segment heuristics
+2.58% / -17.1% var
Banner NDCG@10 / CUPED
178,706 users/arm A/B power sizing

Seven K-Means customer archetypes validated out-of-time (Power Buyers drive 47.4% of test revenue).
The Problem
Standard RFM heuristics collapse on zero-inflated browse-heavy storefronts (where 80%+ of visitors spend $0), while naive promotional targeting wastes contact budget and observational click logs suffer from heavy popularity bias.
What I Built
Built an out-of-time customer decisioning pipeline processing 42.4M REES46 eCommerce events (3.02M users) in DuckDB. Engineered 48 leakage-free temporal features, segmented users with K-Means (k=7), trained calibrated LightGBM purchase/churn models, ranked 239 category banners with LambdaRank + SNIPS counterfactual evaluation, and sized CUPED-accelerated experiments.
Technical Architecture
Raw CSV events become typed Parquet in DuckDB, feeding strict 10-day lookback / 7-day forward snapshots. Segments and calibrated LightGBM probabilities drive an expected-value Next-Best-Action simulator that withholds treatments when expected lift cannot cover marginal contact cost.
DuckDB Ingest & SQL Layer
Cleaned 42.4M events (3.02M users) into 48 leakage-audited temporal features.
K-Means & Calibrated GBDT
7 behavioral archetypes + isotonic/sigmoid calibrated LightGBM propensity models.
LambdaRank + SNIPS
239 category banner ranking with clipped Inverse Propensity Scoring.
NBA Policy & CUPED Sizing
Expected-value treatment gating + 17.11% CUPED variance reduction sizing.
Verification & Key Takeaways
- 37 unit tests including bitwise SQL-vs-pandas checks and shuffled-label leakage audits.
- Explicitly separates observational SNIPS CTR proxy (0.04796) and offline EV simulation from live A/B claims.
- Zero-inflated RFM handling isolates zero-spend users before quartile binning.