-
-
Provides portfolio-wide churn insights, customer risk distribution, average churn probability, and aggregated SHAP-based churn drivers.
-
Tracks campaign results and observed changes in customer churn risk to evaluate retention strategy performance.
-
Displays personalized retention strategies, targeted customer segments, and campaign management features.
-
Configures automated churn monitoring with a 70% risk threshold, seven-day cooldown period, and controlled campaign execution.
-
Upload customer datasets in CSV or Excel format with automatic schema detection, churn target identification, and model reuse.
-
Presents actionable retention campaigns tailored to customer behavior, risk levels, and potential customer recovery.
-
Tracks registered customer accounts and real-time behavioral events, providing insights into customer journeys and interactions.
-
Provides detailed customer insights, including spending, churn risk, activity history, and individual SHAP-based prediction explanations.
-
Displays individual customer churn probabilities, risk classifications, and behavioral metrics with searchable customer records.
-
Visualizes customer churn predictions, risk distribution, churn timelines, and overall customer retention insights.
-
Filters and highlights customers with high churn probabilities, helping businesses prioritize retention efforts
ChurnIQ – AI-Powered Customer Churn Prediction and Retention System
Inspiration
Customer retention is one of the biggest challenges faced by e-commerce businesses. Customers may gradually lose interest, stop interacting with products, or discontinue purchases without explicitly informing the business.
I was inspired to build ChurnIQ because businesses often identify customer churn only after customers have already left. I wanted to develop a system that could identify customers who are likely to leave, understand the reasons behind their behavior, and help businesses take action before losing them.
My goal was to go beyond traditional churn prediction and create an intelligent retention platform that transforms customer data into meaningful business decisions.
What I Built
ChurnIQ is an AI-powered customer churn prediction and retention platform consisting of two integrated components.
1. ChurnIQ – Machine Learning Platform
I developed a platform that allows users to upload customer datasets in CSV or Excel format. It analyzes the dataset, identifies relevant columns, performs semantic feature mapping, handles missing values, and engineers useful customer behavior features.
The platform trains a machine learning model or reuses an existing compatible model to predict customer churn. I integrated SHAP (SHapley Additive exPlanations) to explain individual predictions by identifying the factors contributing to each customer's churn risk.
2. LumaWear – E-commerce Integration
To demonstrate the real-world application of the trained model, I integrated it into LumaWear, an e-commerce application.
The application captures customer activities such as logins, product views, cart interactions, wishlist actions, and purchases. These activities are stored in MongoDB and transformed into 21 customer features.
The FastAPI machine learning service processes these features and returns churn probability, risk classification, SHAP explanations, and personalized retention recommendations.
Administrators can view customer-level churn insights through a dashboard and use automated retention workflows to reach high-risk customers.
How I Built It
I developed ChurnIQ by combining machine learning, data processing, explainable AI, and full-stack application development.
Machine Learning Pipeline
- Used an e-commerce customer churn dataset containing 5,630 records.
- Performed data preprocessing, missing-value handling, categorical encoding, and numerical feature scaling.
- Engineered customer behavior and RFM (Recency, Frequency, Monetary) features.
- Implemented an XGBoost classifier for churn prediction.
- Evaluated the model using 5-fold stratified cross-validation with ROC-AUC as the primary metric.
- Integrated SHAP to interpret model predictions.
- Saved trained models, metadata, feature information, and explainability artifacts using Joblib for reuse.
Application Integration
I developed the LumaWear e-commerce application using React, Express.js, and MongoDB. I used a separate FastAPI service to connect the application with the trained XGBoost model.
The integration follows this workflow:
- Customer activities are recorded and stored in MongoDB.
- The Express backend retrieves customer information and extracts 21 features.
- Features are sent to the FastAPI machine learning service.
- The trained XGBoost model generates a churn probability.
- SHAP identifies the major factors influencing the prediction.
- The system generates personalized retention recommendations.
- Results are displayed on the administrator dashboard.
I also implemented an automated retention workflow that sends emails to customers with a churn probability of 70% or higher every seven days.
Challenges I Faced
1. Handling Different Dataset Structures
Customer datasets may contain different column names and structures. I addressed this challenge by implementing semantic feature mapping, which maps different column names into a common feature structure.
2. Feature Engineering
Raw customer activity does not directly provide all the information required for churn prediction. I worked on extracting meaningful behavioral features, including recency, frequency, spending patterns, engagement, and customer activity.
3. Machine Learning Integration
Connecting a Python-based machine learning model with a JavaScript-based e-commerce backend was challenging. I used FastAPI to establish communication between the Express backend and the trained model.
4. Model Interpretability
A churn probability alone does not explain why a customer is at risk. I integrated SHAP to identify the factors influencing individual predictions and provide more meaningful retention recommendations.
5. Building a Reusable System
I wanted ChurnIQ to work beyond a single dataset or e-commerce application. Saving model artifacts and supporting compatible datasets helped me develop a more reusable architecture.
Results and Impact
The XGBoost model achieved a mean ROC-AUC of 0.9871 ± 0.0037 across 5-fold stratified cross-validation, as reported in the project evaluation.
ChurnIQ provides:
- Customer-level churn probability and risk classification.
- SHAP-based explanations of churn-driving factors.
- Personalized retention recommendations.
- Flexible CSV and Excel dataset processing.
- Reusable trained machine learning models.
- Live e-commerce customer analysis.
- Automated email-based retention workflows.
- An administrator dashboard for actionable customer insights.
What I Learned
Building ChurnIQ helped me understand how machine learning can be transformed into a practical business solution.
I gained hands-on experience in data preprocessing, feature engineering, model training, evaluation, and Explainable AI. I also learned how to integrate Python-based machine learning services with a MERN-stack application using APIs.
One of my biggest takeaways was that making accurate predictions is only one part of solving a business problem. Understanding why a prediction occurs and converting that information into actionable decisions is equally important.
What's Next?
I plan to expand ChurnIQ with:
- Real-time churn monitoring and predictive alerts.
- More advanced customer segmentation.
- Additional machine learning algorithms and model comparisons.
- Adaptive retention strategies based on customer responses.
- Deeper integrations with third-party e-commerce platforms.
- Enhanced analytics for measuring retention campaign effectiveness.
Conclusion
ChurnIQ follows a simple philosophy: Predict → Understand → Act → Retain.
Instead of waiting for customers to leave, I aim to help businesses understand customer behavior and take proactive steps to build lasting customer relationships.
Built With
- artificial-intelligence
- data-science
- explainable-ai
- express.js
- fastapi
- javascript
- joblib
- machine-learning
- mongodb
- node.js
- numpy
- pandas
- predictive-analytics
- python
- react
- rest-api
- scikit-learn
- shap
- xgboost