My role
I built the pipeline in SAS Model Studio and configured the models. I then analyzed and compared the results to choose the champion model, and coordinated the integration of the team's final deliverable.
Problem and data
Losing customers is expensive: revenue goes away, and acquiring new customers costs more than keeping current ones. The case question was: can we identify which customers will leave before it happens?
| Feature | Detail |
|---|---|
| Records | 50,000 customers |
| Variables | 25 (demographic, financial and purchasing behavior) |
| Target variable | Churned (binary classification) |
| Distribution | 28.9% churned (14,450) · 71.1% stayed (35,550) |
| Source | Dataset provided for the course activity (not real customers) |
Machine Learning pipeline
flowchart LR
accTitle: Machine Learning pipeline
accDescr: The customer dataset goes through data preparation and variable configuration; five models are then trained in parallel, compared, and Gradient Boosting is selected as the champion model.
D[(Customer dataset)] --> P[Data preparation]
P --> V["Variable setup (target: Churned)"]
V --> LR[Logistic regression]
V --> DT[Decision tree]
V --> RF[Random Forest]
V --> SVM[SVM]
V --> GB[Gradient Boosting]
LR --> C[Model comparison]
DT --> C
RF --> C
SVM --> C
GB --> C
C --> W["Champion model: Gradient Boosting"]
Process (CRISP-DM)
- Business understandingFraming churn as a supervised classification problem.
- Data exploration and preparationCSV import, metadata setup,
Churnedas the target, and class-balance review. - ModelingPipeline construction and training of five algorithms under the same experimental conditions.
- EvaluationComparison by accuracy, ROC AUC, KS statistic and misclassification rate, plus ROC and Lift curves.
- Selection and recommendationsGradient Boosting chosen as the champion model, with a proposal for using it in retention campaigns.
Results
Test-set accuracy
| Model | Accuracy | ROC AUC | KS | Error rate |
|---|---|---|---|---|
| Gradient Boosting ★ | 91.10% | 0.9194 | 0.7664 | 8.90% |
| Random Forest | 89.74% | 0.9124 | 0.7345 | 10.26% |
| Decision tree | 85.64% | — | — | — |
| SVM | 77.30% | 0.7864 | — | — |
| Logistic regression | 74.78% | 0.7147 | 0.2978 | 25.22% |
— = metric not reported in the deliverable.
Conclusions
- Ensemble models (Gradient Boosting and Random Forest) clearly outperformed the single models.
- Gradient Boosting was best on all four metrics and the strongest at separating customers who leave from those who stay; ROC and Lift curves confirmed it.
- With these predictions, the company can focus retention campaigns on its highest-risk customers and spend its resources more effectively.
Scope and limitations
This is an academic predictive model, not a production solution. It used a single dataset with one train/validation/test split, no cross-validation, and the economic impact of the predictions was not measured. Natural next steps would be adding cross-validation, tuning hyperparameters and estimating the return of a retention campaign.
What it shows
- Predictive modeling: building supervised classification models from historical data.
- Model evaluation and selection: comparing five algorithms across several metrics to choose based on evidence, not intuition.
- Data preparation: defining the target variable, configuring metadata and analyzing class balance.
- From business to analytics: turning a business problem into a measurable one and translating results into recommendations.
- Technical coordination: integrating a team's work into a single technical report.