Equipement Dealer serving Africa, needed to know which aftermarket parts customers were quietly drifting away, early enough that a call still mattered. The catch: the sales export this ran on caps at exactly 1,000,000 rows per year, and the cap doesn't drop a random sample, it drops whole customers. Checked against the one clean, untruncated window in the data, the warehouse retained just 37% of the customers who actually bought in early 2024. Since silence is the only churn signal available, training on the full customer list would have taught a model to detect the export bug, not real churn.
The fix: restrict modeling to the 230 customers observed consistently enough (at least 6 of 12 months) that their silence is credible, build 39 features per account (recency, frequency, monetary trend, contract coverage, product mix) strictly from data before the prediction cutoff, and sweep 17 classifier families under nested cross-validation with bootstrap confidence intervals, since 36 confirmed churners isn't enough data to trust a single train/test split. A cohort-threshold sensitivity check proved the point directly: loosen the cohort and the winning model's top features shift from purchase recency to which country the customer happened to be in, exactly the export-bug signature the restriction exists to avoid.
The winning models (Bernoulli Naive Bayes and Logistic Regression, selected on recall at a fixed precision floor, not raw accuracy) beat simple recency-based ranking with non-overlapping confidence intervals. Delivered as a Streamlit app with a live what-if predictor, driver explanations per account, and an MLflow-tracked model registry with automated drift monitoring.
K-Means segmentation of 2,635 real customers into 4 segments (0.97 bootstrap ARI), surfacing a $668K reactivation list from a deliberately capped export.
Combines process mining and machine learning to detect fraudulent insurance claims from event-log data.
Production microservice web app (Django + ReactJS) automating support computing and claims generation, cutting a multi-day process to minutes.