Machine Learning & CRMMachine Learning & CRM

Customer Churn Prediction & Reactivation PropensityCustomer Churn Prediction & Reactivation Propensity

Modélisation de l'attrition avec XGBoost, feature engineering comportemental, et calcul du ROI de rétention. Churn modeling with XGBoost, behavioral feature engineering, and retention ROI calculation.

🎯 Le Défi OpérationnelThe Operational Challenge

  • Acquérir coûte plus cher que fidéliser.Acquisition is costlier than retention.
  • Arroser tout le monde de promos tue la marge.Blanket discounts destroy profit margins.
  • Objectif : Cibler mathématiquement qui retenir avec quel budget.Goal: Mathematically target who to retain and with what budget.

💡 L'Approche AnalytiqueThe Analytical Approach

  • 📉 Score XGBoost : Calcule la probabilité exacte de départ de chaque client.XGBoost Score: Predicts the exact flight risk of each customer.
  • 💳 Valeur CLV : Estime le revenu futur que le client va générer s'il reste.CLV Value: Estimates the future revenue if the client stays.
  • ⚖️ ROI Net : (CLV × Probabilité) − Coût du Coupon. Si le résultat est positif, on agit !Net ROI: (CLV × Probability) − Coupon Cost. If positive, we act!
XGB
Modèle de Classification Classification Model
ROI
Optimisation Financière Financial Optimization
RFM
Features Transactionnelles Transactional Features

Architecture TechniqueTechnical Architecture

Un pipeline Machine Learning robuste géré avec uv pour le contrôle des dépendances. L'entraînement XGBoost et le feature engineering sont hautement modulaires. A robust Machine Learning pipeline managed with uv for dependency control. The XGBoost training and feature engineering are highly modular.

Livrables : Pipeline `src/`, Notebooks Python réactifs, Fichiers d'exportation d'action CRM. Deliverables: Core `src/` pipeline, reactive Python Marimo Notebooks, CRM action export files.

🐍 Python 🌲 XGBoost 🧪 Pytest 📉 SHAP
Dépôt GitHub du Projet View GitHub Repository

🏗️ Workflow Analytique MLAnalytical ML Workflow

📥
Data Load
Transactions & Produits (Dunnhumby) Transactions & Products (Dunnhumby)
⚙️
Features
Ingénierie RFM et comportements RFM engineering and behaviors
🌲
Train
Walk-forward validation & XGBoost Walk-forward validation & XGBoost
💰
ROI
Optimisation CLV et simulation métier JS CLV optimization and JS business simulation

📊 Dashboard Interactif & Simulation 📊 Interactive Simulation Dashboard

Simulateur natif avec graphiques Plotly. Ajustez les curseurs et filtrez par segment pour observer instantanément l'impact financier d'une campagne de réactivation. Native simulator powered by Plotly. Adjust sliders and filter by segment to see the instant financial impact of a reactivation campaign.

🎯 Min Churn ScoreMin Churn Score 0.70
Seuil de probabilité d'attritionChurn probability threshold
💶 ROI Net MinimumMin Net ROI € 50
Filtrer les clients selon le gain espéréFilter clients by expected gain
AUC-ROC
0.84
Discriminative Power
Lift au Décile 1Lift @ Decile 1
3.2x
vs Random Selection
Clients CiblésTargeted Clients
0
Fitting Criteria
?
ROI net positif généré uniquement par les clients sauvés du churn après déduction de tous les coûts de coupons. Net positive ROI generated solely by clients saved from churn after deducting all given coupon costs.
ROI Net CumuléExpected Net ROI
€ 0
Cumulative upside
?
Les clients les plus rentables à inclure absolument dans la campagne marketing. Classés par ROI. The most profitable clients to absolutely include in the marketing list. Sorted by ROI.

💡 Le Top 10 des clients listés ci-dessus concentre le plus gros potentiel de retour sur investissement. Les cibler en priorité absolue maximise l'impact financier de la campagne dès les premiers jours.💡 The Top 10 clients listed above concentrate the highest potential return on investment. Targeting them with absolute priority maximizes the campaign's financial impact from day one.

?
La matrice de décision : plus le client est à droite et en haut, plus il est vital à l'entreprise ET à haut risque de fuite. The decision matrix: the further right and upwards a client is, the more vital they are to business AND at high risk of flight.

💡 Le nuage de points ci-dessus révèle que l'action CRM n'est véritablement rentable que sur une zone précise (haute valeur CLV + haut risque). La courbe de Pareto ci-dessous confirme qu'accorder des remises en dehors de cette zone détruit la marge.💡 The scatter plot above reveals that CRM action is only truly profitable in a specific zone (high CLV + high risk). The Pareto curve below confirms that granting discounts outside this zone destroys margins.

?
Impact Pareto : Une minorité de clients génère la majorité du ROI total de rétention. Pareto Impact: A minority of clients generates the majority of total retention ROI.
📋 Matrice d'Export CRM (Top 15)CRM Export Matrix (Top 15)
Flux de données prêt à être envoyé à l'équipe Marketing/Salesforce.Data feed ready to be piped to the Marketing/Salesforce team.

🎯 Enseignements Clés & Recommandations 🎯 Key Takeaways & Recommendations

1. Optimisation Ciblée vs. Réduction Massive : Modéliser la probabilité de churn n'est utile que si on y associe la valeur financière du client. Accorder 20€ de réduction pour sauver un client générant 500€ de marge (High CLV) est un excellent investissement, mais la même offre sur un client à 15€ d'historique détruit le revenu. 1. Targeted Optimization vs. Carpet-bombing: Modeling churn probability is only useful when crossed with customer value. Spending €20 to retain a client generating €500 margin is excellent ROI, but the identical offer for a €15 historical value client destroys revenue.

2. L'Hyper-Réactivité Bat La Précision Absolue : Le pipeline produit une matrice d'action quotidienne, isolant les profils chauds (Lift au décile 1 à 3.2x vs aléatoire). Appeler ces clients avant qu'ils ne tarissent leurs dépenses est plus rentable que d'avoir un modèle précis à 99% exécuté trop tard. 2. Hyper-Reactivity Over Absolute Precision: The data pipeline creates a daily actionable matrix isolating hot profiles (First decile lift of 3.2x vs random). Contacting these clients before they stop spending is more profitable than having a 99% accurate model deployed too late.

3. Automatisation CRM : En exportant la sous-table `Matrice CRM` directement vers les outils marketing (ex: Salesforce, Braze), on transforme une modélisation théorique en machine génératrice de chiffre d'affaires. 3. CRM Automation: By pushing the `CRM Matrix` subset directly into marketing automation tools (e.g., Salesforce, Braze), we transform a theoretical model into a daily revenue-generating engine.