Predictive LTV with Machine Learning
Framing LTV as a supervised learning problem
Predictive LTV with machine learning reframes lifetime value estimation as a regression problem: given features known about a customer early in their lifecycle (first-order size, acquisition channel, device/platform, early engagement signals, firmographic data for B2B), predict a continuous target — typically revenue or margin over a fixed future window (90-day, 365-day LTV) rather than true 'lifetime,' since infinite-horizon targets can't be labeled from historical data. The model learns from past customers whose outcome window has already closed, then scores new customers whose window is still open.
The labeling window problem
Choosing the prediction target window is a real tradeoff. A short window (30-day LTV) gives a large, fresh pool of fully-labeled training examples and lets the model score new customers quickly, but it captures only early value and may correlate poorly with true long-term value for businesses with long purchase cycles. A long window (365-day LTV) captures a more complete picture of value but means only customers acquired over a year ago can be used as fully-labeled training examples — shrinking the usable training set and making the model slower to pick up on recent shifts in customer behavior or acquisition mix.
// Typical feature set for an early-lifecycle predictive LTV model.
// Features are computed from only the first N days of customer history -
// using post-window data here would leak the label into the features.
interface CustomerFeatures {
firstOrderValue: number;
daysToSecondOrder: number | null; // null if no second order yet
acquisitionChannel: string;
productCategoryBreadth: number; // distinct categories purchased
emailEngagementRate30d: number; // opens+clicks / emails sent
supportTicketsFirst30d: number;
usedMobileApp: boolean;
firmSizeBucket?: string; // B2B only
}
// Target: net revenue in days 0-365 (label only available for customers
// acquired 365+ days ago at training time).
interface TrainingExample {
features: CustomerFeatures;
label_ltv_365d: number;
}Model choices for predictive LTV
| Model type | Strengths | Weaknesses |
|---|---|---|
| Gradient boosted trees (XGBoost, LightGBM) | Handles mixed feature types well, strong default performance | Less interpretable without SHAP/feature importance analysis |
| Probabilistic (BG/NBD + Gamma-Gamma) | Interpretable, statistically principled for repeat-purchase data | Assumes stationary purchase process; weaker with sparse/B2B data |
| Simple linear/regularized regression | Fully interpretable, fast to retrain, easy to explain to stakeholders | Misses non-linear interactions between features |
| Deep learning / sequence models | Can model full purchase sequences, not just aggregate features | Needs large data volume, harder to maintain and explain |
Feature leakage is the most common way predictive LTV models silently fail
Model output feeds directly into acquisition bidding and lifecycle treatment
What's Next?
Predicting a continuous value like LTV is one branch of customer-level machine learning; the sibling discipline of predicting a binary or categorical outcome — will this customer convert, upgrade, or churn — is propensity modeling, built on much of the same feature engineering foundation.
I build these systems professionally.
Whether it's a RAG pipeline, analytics migration, or AI workflow — let's talk.