An end-to-end machine learning application that predicts whether a telecom customer is likely to churn based on customer, service, contract, and billing information.
The project combines data analysis, preprocessing, classification, model evaluation, input validation, and a Flask web application to turn a machine learning model into an interactive prediction system.
Customer churn is a major challenge for subscription-based businesses.
The objective of this project is to identify customers who are likely to leave a telecom service so that businesses can better understand churn risk and potentially take preventive action.
The system follows this workflow:
Customer Information
↓
Input Validation
↓
Preprocessing
↓
Trained Classification Model
↓
Churn Probability
↓
Prediction Result
This project includes:
- Exploratory Data Analysis
- Data preprocessing
- Logistic Regression classification
- Model evaluation using multiple metrics
- Customer input validation
- Reusable prediction logic
- Flask-based web application
- HTML/CSS user interface
- Saved trained model for inference
- Deployment configuration
The project separates experimentation, data, model artifacts, prediction logic, and application code rather than keeping everything inside a single notebook.
The current model achieves the following results:
| Metric | Score |
|---|---|
| Accuracy | 81.83% |
| ROC-AUC | 86.19% |
| Precision | 68.00% |
| Recall | 59.25% |
| F1 Score | 63.32% |
Accuracy alone does not provide enough information for a churn prediction problem.
Therefore, the model is evaluated using:
- Accuracy — overall proportion of correct predictions
- Precision — proportion of predicted churners who actually churn
- Recall — proportion of actual churners identified by the model
- F1 Score — balance between precision and recall
- ROC-AUC — ability of the model to distinguish between churn and non-churn customers across classification thresholds
The current results indicate useful predictive performance while leaving room for improvement, particularly in recall.
The project uses the Telco Customer Churn dataset.
The target variable is:
Churn
├── Yes
└── No
The dataset contains customer information related to areas such as:
- Demographics
- Tenure
- Phone services
- Internet services
- Contract type
- Billing
- Payment method
- Additional subscribed services
Customer_Churn_Classification_System/
│
├── .gitignore
├── app.py
├── README.md
├── requirements.txt
├── vercel.json
│
├── assests/
│ └── screenshots/
│
├── data/
│ ├── preprocessed/
│ └── raw/
│ └── Telco Customer Churn.csv
│
├── model/
│ └── customer_churn_model.pkl
│
├── notebooks/
│ └── EDA.ipynb
│
├── static/
│ └── css/
│ └── style.css
│
├── templates/
│ ├── index.html
│ └── result.html
│
└── utils/
└── prediction.py
| Component | Purpose |
|---|---|
app.py |
Flask application entry point |
utils/ |
Reusable prediction logic |
notebooks/ |
Exploratory data analysis and experimentation |
data/raw/ |
Original dataset |
data/preprocessed/ |
Processed data |
model/ |
Saved trained model |
templates/ |
HTML pages |
static/ |
CSS and frontend assets |
assests/ |
Project screenshots/assets |
requirements.txt |
Python dependencies |
vercel.json |
Deployment configuration |
The application accepts customer information through a web interface.
User Input
↓
Flask Application
↓
Input Validation
↓
Prediction Logic
↓
Saved ML Model
↓
Churn Prediction
↓
Result Page
The prediction logic is kept separately in:
utils/prediction.py
This keeps the model inference logic separate from the Flask application's routing and presentation layer.
Before making a prediction, the application validates user-provided information to reduce invalid or inconsistent inputs.
This includes checking values and expected input categories before passing the data to the model.
The purpose is simple:
Invalid input should not silently become a model prediction.
- Python
- Pandas
- NumPy
- Scikit-learn
- Jupyter Notebook
- Flask
- HTML
- CSS
- Vercel
- Git
- GitHub
git clone https://github.com/GowthamV-CoderX/Customer_Churn_Classification_System.git
cd Customer_Churn_Classification_Systempython -m venv .venvWindows
.venv\Scripts\activatemacOS / Linux
source .venv/bin/activatepip install -r requirements.txtpython app.pyOpen the application at:
http://127.0.0.1:5000
This project is currently a machine learning portfolio/application project rather than a fully productionized ML system.
Areas that can be improved include:
- Automated testing
- Systematic model comparison
- Cross-validation
- Threshold optimization
- Improved recall
- Model explainability
- Database integration
- API separation
- Dockerization
- CI/CD
- Application monitoring
- Model/data drift monitoring
These limitations are useful next steps for evolving the project toward stronger ML engineering practices.
Potential improvements include:
- Compare multiple classification algorithms systematically.
- Optimize the prediction threshold based on business objectives.
- Improve recall while maintaining acceptable precision.
- Add automated tests for validation and prediction logic.
- Separate the prediction service into a dedicated API.
- Containerize the application with Docker.
- Add CI/CD for automated testing and deployment.
- Add model explainability.
- Introduce monitoring for application and model behavior.
- Evaluate model performance on new incoming data.
Through this project, I developed practical experience with:
- Classification problems
- Exploratory data analysis
- Data preprocessing
- Logistic Regression
- Classification metrics
- Model inference
- Input validation
- Reusable Python modules
- Flask application development
- Connecting a machine learning model to a web application
- Structuring an ML project beyond a single notebook
- Deploying a machine learning application
Gowtham Vudumu
B.Tech CSE (AI & ML)
Focused on building stronger capabilities in:
Machine Learning → Software Engineering → AI Engineering → Real-World Problem Solving
This project is developed for educational and portfolio purposes.