Skip to content

Subheen/pythonDataAnalysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

pythonDataAnalysis

Portfolio Purpose

Customer Churn Prediction

πŸ“Œ Overview

This project analyzes customer churn using machine learning techniques. The goal is to identify key factors contributing to customer churn and build a predictive model to help businesses retain customers.

πŸ“Š Dataset

  • The dataset contains customer information, contract details, and payment methods.
  • Key categorical and numerical features were analyzed.
  • The target variable is Churn (0: No, 1: Yes).

πŸ” Exploratory Data Analysis (EDA)

  • Data cleaning and preprocessing (handling missing values, encoding categorical features).
  • Correlation analysis using heatmaps.
  • Chi-square tests to check dependency of categorical variables on churn.
  • Statistical analysis to identify patterns in numerical data.

Key Findings:

βœ… Higher churn among:

  • Customers without partners or dependents.
  • Month-to-month contract holders.
  • Customers using electronic checks.
  • Senior citizens.

πŸ“ˆ Model Building

Logistic Regression

  • Initial model trained to understand feature importance.
  • Key predictors: Contract type, payment method, senior citizen status, monthly charges.

Random Forest Classifier

  • Improved model performance.
  • Feature importance analysis showed Contract Type as the most significant predictor.

πŸ† Results & Evaluation

  • Accuracy: 80%
  • Precision & Recall:
    • Churned customers (1): 68% precision, 48% recall.
    • Non-churned customers (0): 83% precision, 92% recall.
  • The model effectively predicts churn but struggles with recall for actual churned customers.

πŸš€ Next Steps

  • Tune hyperparameters for better recall.
  • Try advanced models like XGBoost.
  • Deploy as a web app for real-time predictions.

πŸ“‚ Repository Structure

πŸ“ Churn Prediction
 β”œβ”€β”€ πŸ“œ Churn Prediction.ipynb  # Jupyter Notebook with full analysis
 β”œβ”€β”€ πŸ“œ README.md               # Project documentation
 β”œβ”€β”€ πŸ“Š data/                   # Dataset 
 β”œβ”€β”€ πŸ“‚ models/                 # Trained model files
 └── πŸ“ˆ plots/                   # Visualizations

πŸ› οΈ Tech Stack

  • Python (pandas, numpy, scikit-learn, seaborn, matplotlib)
  • Machine Learning: Logistic Regression, Random Forest

πŸ‘₯ Contributors

  • Sabheen Gull

πŸ“’ Feedback

Have suggestions? Feel free to open an issue or contribute!


πŸš€ Star this repository if you found it helpful! ⭐

About

Portfolio Purpose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published