Overview
This project focuses on analyzing customer data, predicting customer churn using machine learning, and identifying customer and sales trends to support data-driven business decisions.
1. Project Architecture
The project follows a structured data analytics and machine learning workflow:
- Data Collection: Imported customer churn dataset in CSV format using Pandas.
- Data Preprocessing: Checked missing values, removed duplicate records, and converted categorical variables into numerical format using Label Encoding.
- Exploratory Data Analysis (EDA): Analyzed customer churn distribution, monthly charges, and feature correlations using Matplotlib and Seaborn.
- Feature Selection: Separated the dataset into independent features (X) and target variable (Churn).
- Model Training: Split the dataset into 80% training and 20% testing data.
- Machine Learning: Implemented Logistic Regression, Decision Tree, Random Forest, and XGBoost classification algorithms.
- Model Evaluation: Compared model performance using accuracy scores.
- Customer Segmentation: Applied K-Means clustering with four clusters to identify different customer groups.
- Sales Analysis: Analyzed total charges by customer tenure and contract type using visualizations.
- Model Saving: Saved the trained Random Forest model using Joblib for future use.
2. Technology Stack
- Programming Language: Python
- Data Processing: Pandas, NumPy
- Data Visualization: Matplotlib, Seaborn
- Machine Learning: Scikit-learn, XGBoost
- Clustering: K-Means
- Model Serialization: Joblib
- Development Environment: Jupyter Notebook / Google Colab
3. Machine Learning Model Performance
The following accuracy scores were obtained during model evaluation:
- Logistic Regression: 79.84%
- Decision Tree: 71.47%
- Random Forest: 80.41%
- XGBoost: 78.78%
Random Forest achieved the highest accuracy of approximately 80.41% among the four tested models.
4. Problems Solved and Business Value
The project helps identify potential customer churn patterns, understand customer behavior, segment customers into groups, and analyze sales trends based on tenure and contract type. These insights can help businesses improve customer retention strategies, understand revenue patterns, and make better business decisions.
5. Final Outcome
Successfully developed a customer churn prediction workflow, compared four machine learning algorithms, performed customer segmentation, created sales analysis visualizations, and saved the trained Random Forest model for potential future applications.
Interested in building production AI & Full Stack systems with 1:1 mentorship and verified credentials? Explore the [DBERT AI Fellowship](https://lms.dbert.in).