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.
- Fill out a form with customer details
- Get churn prediction in real time
- Visual insights using SHAP values and business logic explanations (via Recharts)
- Upload a CSV of multiple customers
- Download CSV with churn predictions and probability scores
- Upload your own dataset to train a custom model
- Compare performance with the base model (Random Forest)
- Choose the preferred model for future predictions
- Short guides, tooltips, and explanations of churn concepts
- FAQs and actionable strategies based on predictions
- Use case examples and optional guided tour
- 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
Live demo Link- https://customer-churn-analyzer-r19l.onrender.com
- 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
- What is Churn?
- How does our model work?
- How to interpret predictions?
- Business actions to reduce churn
- FAQs and example use cases
cd frontend
npm i
npm run devcd backend
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
python app.pyMIT License β feel free to use, fork, and contribute!
Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.
Thanks to the open-source community for tools like SHAP, SMOTEENN, and Recharts and Kaggle for providing dataset.

















