Skip to content

Lab · Master's in Applied AI · Tecnológico de Monterrey

Customer Churn Prediction with Machine Learning

Case study from the Master's in Applied Artificial Intelligence at Tecnológico de Monterrey, course TI5048 – Machine Learning for Decision Making (August 2026, team project). Using a dataset of 50,000 customers from the fictional company RetailGenix, five classification algorithms were trained and compared in SAS Model Studio to spot customers at risk of leaving before they do. The winning model, Gradient Boosting, reached 91.1% accuracy.

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?

FeatureDetail
Records50,000 customers
Variables25 (demographic, financial and purchasing behavior)
Target variableChurned (binary classification)
Distribution28.9% churned (14,450) · 71.1% stayed (35,550)
SourceDataset 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"]
Figure 1. Flow built in SAS Model Studio: all five models are trained on the same data under the same conditions.

Process (CRISP-DM)

  1. Business understandingFraming churn as a supervised classification problem.
  2. Data exploration and preparationCSV import, metadata setup, Churned as the target, and class-balance review.
  3. ModelingPipeline construction and training of five algorithms under the same experimental conditions.
  4. EvaluationComparison by accuracy, ROC AUC, KS statistic and misclassification rate, plus ROC and Lift curves.
  5. Selection and recommendationsGradient Boosting chosen as the champion model, with a proposal for using it in retention campaigns.

Results

Test-set accuracy

  • Gradient Boosting91.10%
  • Random Forest89.74%
  • Decision tree85.64%
  • SVM77.30%
  • Logistic regression74.78%
Full model comparison (test set)
ModelAccuracyROC AUCKSError rate
Gradient Boosting ★91.10%0.91940.76648.90%
Random Forest89.74%0.91240.734510.26%
Decision tree85.64%———
SVM77.30%0.7864——
Logistic regression74.78%0.71470.297825.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.