π Customer Lifetime Value Prediction Model
Context & Problem
In our B2B marketplace, customers have no contractual obligation to stay β they buy when they want, and stop without notice. This presented a challenge: how can we estimate the sales potential of each existing buyer if their future behavior is unknown?
We framed this business question as: βWhat is the expected customer lifetime value (CLV) of each buyer in the next 1, 3, and 6 months?β This would let us forecast future revenue, detect potential churn, and personalize interventions.
Solution & Methodology
Inspired by Fader et al. (2005) and Fader & Hardie (2013), we implemented a non-contractual CLV framework using:
- BG/NBD Model β to model purchase frequency and dropout probability
- Gamma-Gamma Model β to estimate expected transaction value

The BG/NBD model uses frequency (x), recency (tx), and total time observed (T) to estimate repeat purchasing and churn probability.
Using transaction logs from our data warehouse, we trained and validated the model weekly with lifetimes Python library, using a root mean squared error (RMSE) threshold of 5% to ensure acceptable predictive accuracy.
Results & Business Value
- Weekly CLV calculation for 1, 3, and 6-month horizons
- Predicted probability of churn for each customer
- Customer segmentation based on future value
- Triggering Salesforce cases for at-risk customers
- More timely, personalized retention and loyalty campaigns
π Files and Scripts
View them on GitHub:
π View CLV project on GitHub β Back to All Projects