Project Title

ChurnIQ – End-to-End Telecom Churn Prediction & ROI Optimization Engine

Architecture: Serverless API & Interactive Web Dashboard

Tech Stack: Python, Scikit-Learn, XGBoost, FastAPI, Next.js, Vercel, SHAP, LIME

Executive Summary

Customer churn is one of the most expensive problems in the telecommunications industry. While predicting churn is a standard data science task, translating those predictions into measurable business value requires more than just an accurate algorithm.

ChurnIQ is an end-to-end, deployed predictive analytics solution. It moves beyond standard classification by integrating Explainable AI (XAI) to build stakeholder trust and a dynamic ROI calculator to ensure retention strategies are commercially viable. Built with a Next.js frontend and a serverless FastAPI backend, this project demonstrates how to architect a data ecosystem that empowers business leaders to make predictive, revenue-impacting decisions.

The Business Problem

In telecom, retaining an existing customer is significantly cheaper than acquiring a new one. However, blanket retention campaigns (e.g., offering discounts to everyone) destroy profit margins. Business teams need to know:

  1. Who is going to churn?
  2. Why are they leaving?
  3. Does the financial math make sense to intervene?

The Solution & Architecture

To solve this, I engineered a full-stack data solution rather than a static script. The architecture relies on a serverless Python backend deployed on Vercel, enabling scalable, on-demand inference without the overhead of maintaining a persistent server.

Key Components:

  • Machine Learning Pipeline: A robust classification pipeline (evaluating Gradient Boosting, XGBoost, and Random Forest) optimized for Recall and F1-Score to effectively capture true churners within highly imbalanced telecom data.
  • Automated Feature Engineering: Custom preprocessing modules that dynamically create interaction features (e.g., Service_Density, Charge_Gap, Tenure_Charge_Interaction) to capture nuanced customer behaviors.
  • Serverless API (FastAPI): A lightweight, Vercel-optimized backend supporting both single-customer real-time inference and bulk CSV batch predictions.

Core Innovations

Explainable AI (XAI) for Stakeholder Trust

Black-box models are rarely trusted by operations teams. To solve this, I integrated SHAP (SHapley Additive exPlanations) and LIME (Local Interpretable Model-agnostic Explanations) directly into the production API.

  • Global Insights: The system calculates overall feature importance, showing the business exactly which factors (e.g., fiber optics, month-to-month contracts) drive overall churn.
  • Local Insights: For any individual customer prediction, the API returns the specific features pushing their risk score up or down, allowing customer service agents to tailor their retention pitches perfectly.

Dynamic ROI & Commercial Viability

A model is only as good as the money it saves. I built a dynamic ROI optimization engine alongside the model. By inputting the target customer base, Average Revenue Per User (ARPU), and retention campaign costs, the system calculates the exact break-even point and Net ROI. This allows executives to stress-test their assumptions (Conservative vs. Optimistic save rates) before spending a single dollar on retention.

Seamless Deployment

Overcoming the constraints of serverless deployment—such as Vercel’s strict 250MB function size limits—required careful environment management and optimized routing (APIRouter) to seamlessly connect the Next.js frontend with the complex Python ML backend.

Outcomes & Impact

  • Developed a scalable, production-ready framework that bridges the gap between theoretical machine learning and practical business application.
  • Proved that integrating XAI (SHAP/LIME) into standard workflows demystifies AI logic for non-technical leadership.
  • Created a reusable blueprint for transforming raw historical data into an interactive, commercially focused SaaS-style dashboard.

Live Demo

error: Content is protected !!