Skip to content
Data & AI

Intelligent Multi-Model System — Customer Retention & Revenue Risk

Proactive decision-support system that anticipates customer disengagement and estimates "Revenue at Risk", maximising Customer Success ROI.

Client
EFREI academic project
Year
2026
Expertise
Data & AI
Services
Data Science, Machine Learning, Data Engineering, Dashboard
Tools
  • Machine Learning
  • FastAPI
  • Streamlit
  • Docker
  • MLOps

Context

In the services sector, acquiring a new customer costs 5 to 25 times more than retaining an existing one. This certification project (RNCP40875, Data Engineering Expert — EFREI Paris), built by Kévin HEUGAS & Valentin MASSONNIERE, turns raw customer activity data into a proactive decision-support system that anticipates disengagement and dynamically estimates "Revenue at Risk".

Our approach

The project delivers a complete AI pipeline (hybrid Agile/CRISP-DM).

  • Modelling & ML

    Training and comparing several algorithms (Logistic Regression, Random Forest, XGBoost, Deep Learning). Logistic Regression was selected for maximising Recall (63.7%) to effectively target customers about to leave.

  • Data Engineering & Deployment

    A FastAPI API containerised with Docker, and class imbalance handled with SMOTE.

  • Interface

    An interactive Streamlit dashboard for customer simulation and global analysis.

Deliverables

An inference micro-service (API) and a complete analytics dashboard, deployed with Docker Compose, helping business teams optimise the ROI of their retention campaigns.

Live demo

The simulator, live

Adjust a customer profile and watch their churn probability and the revenue at stake. Hosted on Streamlit Cloud, the app may take a few seconds to wake up.

Business decision & modelling

The least “accurate” model was the right one

XGBoost has the best Accuracy, but when only ~20% of customers leave, predicting “stays” almost everywhere is enough to be right 9 times out of 10. Its 3.4% Recall makes it blind to churn. Logistic Regression, at 66.9% Accuracy, is the only model able to detect two thirds of the customers about to leave (63.7% Recall): that is what matters to a Customer Success team.

  • Logistic Regression

    Selected
    Recall
    63.7%
    Accuracy
    66.9%
  • XGBoost / Random Forest

    Discarded
    Recall
    3.4%
    Accuracy
    89.0%

SMOTE rebalancing

With ~20% churn, the minority class is under-represented. SMOTE generates synthetic churners in the training set so the model actually learns their profile.

SHAP

Interpretable by design

Readable coefficients and global SHAP analysis: every risk score can be explained to business teams.

MLOps architecture

From raw data to dashboard

The end-to-end pipeline, from exploratory analysis to the micro-service feeding the dashboard.

Data Prep

EDA & Preprocessing

Exploratory analysis of the raw data (10,000 customers), then minority-class rebalancing with SMOTE and feature scaling with StandardScaler.

  • Pandas
  • SMOTE
  • StandardScaler

Tech stack

Tooling

Backend & ML

  • Python 3.10
  • Scikit-learn
  • XGBoost
  • Imbalanced-learn (SMOTE)
  • SHAP
  • Joblib

API & UI

  • FastAPI
  • Uvicorn
  • Streamlit
  • Plotly

Industrialisation

  • Docker
  • Docker-Compose
  • Makefile
  • Git
View the full source code (GitHub)(new tab)

Docker setup, notebooks and the API running behind the scenes.

More projects Data & AI

Back to portfolio