Skip to content

Churn Predictor is a Machine Learning Project which help Service provider companies to check the reliability of the customers

License

Notifications You must be signed in to change notification settings

abubakarp789/Churn_Predictor

Repository files navigation

Churn Prediction

License Python Flask

Table of Contents

Introduction

Customer churn is when customers stop using a company's services. Predicting churn helps businesses retain customers by identifying at-risk individuals and addressing their concerns.

Project Overview

The Churn Prediction project utilizes machine learning to forecast customer churn based on historical data. It includes data preprocessing, exploratory analysis, feature engineering, model training, and deployment through a Flask web application.

Features

  • Data Cleaning: Handles missing values and encodes categorical variables.
  • Exploratory Data Analysis: Visualizes data distributions and correlations.
  • Model Training: Implements Decision Tree, Random Forest, and ANN models.
  • Deployment: Provides a Flask web app for real-time predictions.

Technologies

  • Language: Python 3.8+
  • Libraries: pandas, numpy, matplotlib, seaborn, scikit-learn, torch, Flask, pickle

Contributors ✨

Thanks to these amazing people for contributing to this repository:

Prabal Patra
Prabal Patra

Nazim Saifi
Nazim Saifi

Muhammad Bilal
Muhammad Bilal

Installation

Prerequisites

  • Python 3.8+
  • pip

Steps

  1. Clone the Repository:

    git clone https://github.com/yourusername/Churn_Prediction.git
    cd Churn_Prediction
  2. Create and Activate Virtual Environment:

    python -m venv venv
    # Windows
    venv\Scripts\activate
    # macOS/Linux
    source venv/bin/activate
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Prepare Dataset:

    Place train.csv and test.csv in the dataset/ folder.

  5. Train Models (Optional):

    Run the notebook in notebooks/Churn_Prediction.ipynb to train and save models.

Usage

Running the Flask App

  1. Navigate to App Directory:

    cd app
  2. Ensure Model is Present:

    Verify models/random_forest_model.pkl exists.

  3. Start the App:

    python app.py
  4. Access the Application:

    Open http://127.0.0.1:5000/ in your browser.

Using the API

Send a POST request to http://127.0.0.1:5000/predict with the required data to receive churn predictions.

Contributing

Contributions are welcome! Follow these steps:

  1. Fork the Repository

  2. Clone Your Fork:

    git clone https://github.com/yourusername/Churn_Prediction.git
    cd Churn_Prediction
  3. Create a Branch:

    git checkout -b feature/YourFeature
  4. Commit Changes:

    git commit -m "Description of your feature"
  5. Push and Create Pull Request:

    git push origin feature/YourFeature

License

This project is licensed under the MIT License.

About

Churn Predictor is a Machine Learning Project which help Service provider companies to check the reliability of the customers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •