Telco Churn Mlops Pipeline

A end-to-end MLOps pipeline for predicting telecom customer churn, featuring automated data preprocessing, ML model training, experiment tracking with MLflow, distributed training using PySpark, real-time inference via Kafka streaming, Airflow DAG orchestration, and Dockerized REST API deployment.

Data ScienceJupyter NotebookMIT

Abstract

Telco Churn Mlops Pipeline is an open-source Data Science project. A end-to-end MLOps pipeline for predicting telecom customer churn, featuring automated data preprocessing, ML model training, experiment tracking with MLflow, distributed training using PySpark, real-time inference via Kafka streaming, Airflow DAG orchestration, and Dockerized REST API deployment. This project implements a production-grade MLOps pipeline for predicting customer churn in the telecommunications industry. It addresses a critical business problem: telecom companies lose 26.5% of customers annually, costing billions in revenue. It is built using Jupyter Notebook, scikit-learn, Docker. The complete source code is publicly available on GitHub under the MIT License, making it a useful reference for students building a Data Science mini project or final-year project.

1. Introduction

This project implements a production-grade MLOps pipeline for predicting customer churn in the telecommunications industry. It addresses a critical business problem: telecom companies lose 26.5% of customers annually, costing billions in revenue.

2. Objective

A end-to-end MLOps pipeline for predicting telecom customer churn, featuring automated data preprocessing, ML model training, experiment tracking with MLflow, distributed training using PySpark, real-time inference via Kafka streaming, Airflow DAG orchestration, and Dockerized REST API deployment.

This project demonstrates how Jupyter Notebook, scikit-learn, Docker can be applied to a real-world Data Science problem.

4. Technology Stack

Jupyter Notebookscikit-learnDocker

5. System Requirements

General requirements for this technology stack — check the README for exact versions.

  • Python 3.8 or later with Jupyter Notebook / JupyterLab (or Google Colab)
  • pip for dependencies
  • Git (to clone the repository)

6. Installation & Setup

git clone https://github.com/deaneeth/telco-churn-mlops-pipeline.git
cd telco-churn-mlops-pipeline
  1. REST API with Flask (/ping, /predict endpoints)
  2. Batch inference pipeline (100+ predictions)
  3. Docker containerization (port 5000)
  4. Production-ready configuration management
# 1. Clone and setup
git clone https://github.com/deaneeth/telco-churn-mlops-pipeline.git
cd telco-churn-mlops-pipeline
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

# 2. Install dependencies
pip install -r requirements.txt

# 3. Run end-to-end demo
python pipelines/sklearn_pipeline.py  # Train model
python src/inference/predict.py        # Make predictions

# 4. Start Kafka demo (optional)
docker-compose -f docker-compose.kafka.yml up -d
python src/streaming/producer.py --mode batch --rows 100
python src/streaming/consumer.py
# 1. Train model
python pipelines/sklearn_pipeline.py

# 2. Start MLflow UI
mlflow ui --port 5000

# 3. Make predictions
python src/inference/predict.py

# 4. Start REST API
python src/api/app.py

Full setup instructions are in the project README.

7. Future Enhancements

Suggested extensions you can add to make this your own project.

  • Turn the analysis into an interactive dashboard
  • Automate data refresh with a scheduled job
  • Add a predictive model on top of the analysis

8. Viva / Review Questions

Common questions examiners ask for projects in this domain.

  1. What is the source of the dataset and how was missing data handled?
  2. Which exploratory analysis steps revealed the most useful insight?
  3. Why were these particular charts chosen to present the data?
  4. Which statistical or ML technique supports the conclusions?
  5. How could the analysis be automated or refreshed with new data?

9. Source Code & License

This project is developed by deaneeth and published on GitHub under the MIT License. Please follow the license terms and credit the original author when you use or modify this code.

Want to build this as your internship project?

Work on a Data Science project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.

Apply for Data Science Internship