← back to projects
projectscustomer-churn-prediction.md

$ cat README.md

project_02

Customer Churn Prediction

Classification • Random Forest

completed
AlgorithmRandom Forest
ProblemClassification
Accuracy77.9%
Features30
DeploymentStreamlit
StatusDeployed

## Project Objective

Develop a complete Machine Learning classification pipeline capable of predicting customer churn using historical telecom customer data.

The objective is to help businesses identify high-risk customers early and support customer retention strategies through predictive analytics.

## Dataset

The project uses the IBM Telco Customer Churn dataset containing customer demographics, subscription details, billing information, and churn status.

After preprocessing, the final model was trained using 30 engineered features.

## Data Preprocessing

  • Removed customer identifiers
  • Handled categorical variables
  • One-hot encoded features
  • Scaled numerical features
  • Separated training and testing data
  • Saved preprocessing pipeline using Joblib

## Model Development

Multiple classification models were evaluated before selecting Random Forest Classifier as the final production model.

Feature importance was analysed to understand which customer attributes contributed most to churn prediction.

## Model Performance

  • Random Forest Classifier
  • Accuracy: 77.9%
  • 30 Processed Features
  • Feature Importance Analysis
  • Probability-based Predictions

## Application Features

  • Interactive customer input form
  • Real-time churn prediction
  • Churn probability estimation
  • Feature importance visualization
  • Retention recommendations
  • Interactive dashboard
  • Cloud deployment using Streamlit

## Deployment

The trained Random Forest model and preprocessing pipeline were serialized using Joblib and deployed through a Streamlit application.

Users can perform predictions directly from the web interface without installing Python.

## Key Learnings

  • Binary classification workflows
  • Feature engineering
  • Categorical encoding
  • Model persistence using Joblib
  • Probability prediction
  • Interactive ML deployment
  • Feature importance interpretation

## Future Improvements

  • Improve model accuracy
  • Deploy using FastAPI
  • Containerize using Docker
  • Integrate MLflow
  • Automate retraining
  • Add SHAP explainability

## Tech Stack

requirements.txt

PythonPandasNumPyScikit-learnRandom ForestPlotlyStreamlitJoblib

## Completion Date

25 July 2026

## Resources