Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Customer Churn Prediction Platform

A full-stack, user-centric machine learning platform to predict customer churn with deep insights, model customization, and educational resources.

Built using React, Flask, and Scikit-learn, this app enables real-time and batch predictions, lets users train custom models, and explains predictions using SHAP and business logic visualizations.


πŸš€ Features

1. πŸ” Single Customer Prediction

  • Fill out a form with customer details
  • Get churn prediction in real time
  • Visual insights using SHAP values and business logic explanations (via Recharts)

2. πŸ“‚ Batch Prediction

  • Upload a CSV of multiple customers
  • Download CSV with churn predictions and probability scores

3. 🧠 Model Manager

  • Upload your own dataset to train a custom model
  • Compare performance with the base model (Random Forest)
  • Choose the preferred model for future predictions

4. 🏠 Home (Knowledge Hub)

  • Short guides, tooltips, and explanations of churn concepts
  • FAQs and actionable strategies based on predictions
  • Use case examples and optional guided tour

πŸ› οΈ Tech Stack

  • Frontend: React + Recharts (for visualizations)
  • Backend: Flask (REST API)
  • ML Pipeline:
    • Random Forest Classifier
    • SHAP for explainability
    • Business logic rule engine
    • Data balancing (SMOTEENN)
    • Data cleaning & preprocessing
  • Other Tools: Pandas, Scikit-learn, Imbalanced-learn

πŸ“Έ Preview

Live demo Link- https://customer-churn-analyzer-r19l.onrender.com

  • Single prediction with insights
    image

    image

    image

  • Batch prediction result Screenshot 2025-04-30 221323

    image

    image

    image

  • Model training & comparison
    image

    image

    image

    image

    image

  • Knowledge Hub interface
    image

    image

    image

    image

    image

    image


πŸ“Š ML Model Info

  • Default Model: Trained on original dataset with Random Forest
  • Custom Model Support: Upload CSV to retrain
  • Balancing: SMOTEENN for class imbalance
  • Explainability: SHAP + Business logic
  • Comparison Metrics: Accuracy, Precision, Recall, F1-Score

πŸ“š Knowledge Hub Includes

  • What is Churn?
  • How does our model work?
  • How to interpret predictions?
  • Business actions to reduce churn
  • FAQs and example use cases

πŸ§ͺ How to Run Locally

Frontend (React)

cd frontend
npm i
npm run dev

Backend (Flask)

cd backend
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows
pip install -r requirements.txt
python app.py

πŸ“„ License

MIT License β€” feel free to use, fork, and contribute!


🀝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.


πŸ™Œ Acknowledgements

Thanks to the open-source community for tools like SHAP, SMOTEENN, and Recharts and Kaggle for providing dataset.


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages