Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Advanced Customer Churn Prediction System

Python XGBoost FastAPI

An end-to-end Machine Learning ecosystem designed to identify at-risk customers using behavior analytics. This system includes a complete pipeline: Automated Data Synthesis -> Feature Engineering -> Model Training -> Real-time API Deployment.

📌 Project Overview

Losing a customer costs 5x more than retaining one. This project utilizes the power of XGBoost to predict which customers are likely to churn in the next billing cycle, allowing businesses to take proactive retention actions.

✨ Key Features:

  • Modular Pipeline: Clean and industry-standard folder structure.
  • Explainable AI: Feature importance visualization to understand churn drivers.
  • Automated Analytics: Generates a 4-panel executive dashboard for stakeholders.
  • Production-Ready API: Real-time prediction service built with FastAPI.

📊 Business Intelligence & Visualization

The model automatically outputs high-quality analytical reports to the images/ directory.

1️⃣ Executive Analysis Dashboard

A comprehensive 4-panel view showing the overall health of the customer base. Executive Dashboard

2️⃣ Churn Ratio & Feature Impact

Churn Distribution Key Drivers


🛠️ Technology Stack

  • Engine: Python 3.14+
  • Data Science: Pandas, NumPy, Scikit-learn
  • Machine Learning: XGBoost (Extreme Gradient Boosting)
  • Deployment: FastAPI, Uvicorn
  • Visualization: Matplotlib, Seaborn

📁 Repository Structure

Customer-Churn-Prediction/
├── data/           # Raw and processed datasets
├── images/         # Automated visual reports (Pie, Bar, Dashboard)
├── models/         # Serialized ML models (.joblib)
├── src/            # Modular Python scripts (Loader, Preprocessor)
├── api_service.py  # FastAPI Production Service
├── main.py         # Main training pipeline execution
└── README.md       # Professional documentation
🚀 How to Run locally
Clone the Repo:

Bash
git clone [https://github.com/dalimkumar452-sudo/Customer-Churn-Prediction-Model.git/Customer-Churn-Prediction.git]

Install Requirements:

Bash
pip install -r requirements.txt
Train & Generate Reports:

Bash
python main.py
Launch API Service:

Bash
uvicorn api_service:app --reload
👨‍💻 Developer
Dalim Kumar

GitHub: https://github.com/dalimkumar452-sudo/Customer-Churn-Prediction-Model.git

Project Scope: Machine Learning / Customer Analytics / Data Engineering

About

An end-to-end Machine Learning pipeline to predict customer churn using XGBoost and FastAP

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages