Skip to content

This project is a web application built with Streamlit that predicts the probability of a customer leaving a bank (churn prediction) using multiple machine learning models (Random Forest, XGBoost, and K-Nearest Neighbors).

Notifications You must be signed in to change notification settings

sheicky/Customer_Churn_Prediction_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎯 Customer Churn Prediction

Made with ❤️ by Sheick

Python Scikit-learn XGBoost Streamlit

📋 Overview

An advanced machine learning application that predicts customer churn probability using ensemble methods and provides personalized insights through an interactive Streamlit dashboard. image image

🌟 Features

  • Multi-Model Prediction System

    • Random Forest
    • XGBoost
    • K-Nearest Neighbors
    • Ensemble Voting Classifier
  • Interactive Dashboard

    • Real-time predictions
    • Dynamic visualization
    • Customer profile analysis
    • Personalized recommendations
  • Advanced Analytics

    • Probability gauges
    • Feature importance analysis
    • Model comparison charts
    • AI-powered explanations

🛠️ Technical Stack

  • Frontend: Streamlit
  • Backend: Python 3.12
  • ML Libraries:
    • scikit-learn
    • XGBoost
    • pandas
    • numpy
  • API Integration: Groq API for AI explanations
  • Data Visualization: Plotly

🚀 Installation

  1. Clone the repository
git clone https://github.com/yourusername/Customer_Churn.git
cd Customer_Churn
  1. Create a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies
pip install -r requirements.txt
  1. Set up environment variables
cp .env.example .env
# Add your GROQ_API_KEY to .env
  1. Run the application
streamlit run main.py

📊 Model Performance

Model Accuracy F1-Score ROC AUC
XGBoost 0.859 0.85 0.89
Random Forest 0.854 0.84 0.88
KNN 0.832 0.82 0.85

🔍 Project Structure

Customer_Churn/
├── main.py              # Main Streamlit application
├── utils.py             # Utility functions
├── models/             # Trained ML models
├── churn.csv           # Dataset
├── requirements.txt    # Project dependencies
└── README.md          # Project documentation

About

This project is a web application built with Streamlit that predicts the probability of a customer leaving a bank (churn prediction) using multiple machine learning models (Random Forest, XGBoost, and K-Nearest Neighbors).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors