Skip to content

vaibhav01062003/Telco_churn_prediction

Repository files navigation

Telco Churn Prediction

Overview

This project is a customer churn prediction system for a telecom company. The goal is to analyze customer data and predict whether a customer is likely to churn based on various features such as tenure, contract type, monthly charges, and internet services.

Dataset

The dataset consists of 7043 rows and 21 columns. The key features include:

  • Demographic Information: Gender, Senior Citizen, Partner, Dependents
  • Service Information: Phone Service, Multiple Lines, Internet Service, Streaming Services
  • Billing Information: Contract Type, Payment Method, Monthly Charges, Total Charges
  • Target Variable: Churn (Yes/No)

Features Used in the Model

After preprocessing, the final model is trained on 16 selected features after applying feature engineering techniques such as encoding categorical variables and handling missing values.

Model Used

The Random Forest Classifier is used for prediction. Data balancing is performed using SMOTE (Synthetic Minority Over-sampling Technique) to handle class imbalance.

Performance Metrics

  • Accuracy: 85%
  • Precision: 84%
  • Recall: 85%
  • ROC AUC Score: 85%

Installation & Setup

To run this project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/yourusername/telco-churn-prediction.git
    cd telco-churn-prediction
  2. Create a virtual environment (optional but recommended):

    python -m venv venv  # Windows
    source venv/bin/activate  # Mac/Linux
    venv\Scripts\activate  # Windows (PowerShell)
  3. Install dependencies:

    pip install -r requirements.txt
  4. Run the Streamlit app:

    streamlit run app.py

Project Structure

├── data/                
├── models/              
├── app.py               
├── churn_model.pkl      
├── requirements.txt     
├── README.md            

Usage

  • Enter customer details in the Streamlit app.
  • Click "Predict Churn" to see the prediction result along with the confidence percentage.
  • The model will predict whether a customer is likely to churn.

Future Improvements

  • Hyperparameter tuning for better accuracy.
  • Deploying the model using AWS/GCP/Heroku.
  • Adding Explainability with SHAP values.

License

This project is open-source and available under the MIT License.

Author

Developed by Vaibhav Pal. Contributions are welcome!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors