HLI

Haidar Labib Izzakif • Data Analyst

INITIALIZING SYSTEM0%
Back to All Projects
Machine Learning & Customer AnalyticsCase Study • Technical Overview

Customer Behavioral Segmentation & Churn Prevention

A machine learning pipeline that categorizes e-commerce customers based on Recency, Frequency, and Monetary (RFM) metrics, paired with unsupervised clustering algorithms to tailor retention campaigns.

PythonScikit-LearnK-MeansPandasPlotlySeabornSQL
0.89
AUC-ROC
-6.8%
Churn Cut
4.2x
CTR Lift
$185K
Revenue Saved

1. Business Problem & Objective

Generic marketing emails led to low engagement (1.8% open rate) and elevated annual customer churn (22%), straining customer acquisition cost budgets.

2. Dataset Description

850,000 transaction records across 120,000 unique registered customer accounts over a 3-year period.

3. Data Cleaning & Preprocessing

  • Calculated RFM metrics per individual customer account based on baseline snapshot date.
  • Applied Log transformation and StandardScaler normalization to correct right-skewed monetary distributions.
  • Removed zero-value transactions and guest checkout anomalies.

4. Methodology & Machine Learning Architecture

Analytical Steps

  • Elbow Method & Silhouette Analysis to determine optimal cluster count (K=5).
  • K-Means clustering & Principal Component Analysis (PCA) for 2D/3D cluster visualization.
  • Logistic Regression & Random Forest modeling to classify churn risk probability.

Model Development & Evaluation

Trained Random Forest Classifier achieving an AUC-ROC of 0.89 for predicting customer churn risk 30 days prior to account inactivity.

5. Results & Strategic Business Insights

Key Results Achieved

  • Identified 'At-Risk Champions' cohort generating 35% of revenue.
  • Targeted win-back email campaign increased email CTR by 4.2x.
  • Reduced annual customer churn rate by 6.8 percentage points.

Actionable Insights

  • Customers who purchase twice within the first 14 days have an 82% higher 2-year LTV.
  • Offering proactive support outreach to 'High-Monetary / Low-Recency' users rescued $185K in impending churn revenue.