Customer_Churn_Prediction_ML_System
π Enterprise Customer Churn Prediction System π | End-to-End ML Pipeline π€ with FastAPI β‘, Risk Stratification π― & Explainable AI π
π Project Overview
The primary objective of this project is to architect an end-to-end Machine Learning classification pipeline that evaluates customer demographics, account tenure, usage patterns, and support history to predict churn risk, stratify customers into risk tiers, and serve inference through a FastAPI service.
π Repository Structure
Generated: 10/17/2026, 7:58:39 PM
Root Path: workspace\Customer_Churn_Prediction_ML_System
βββ π Data
β βββ π customer_churn_dataset-training-master.csv
βββ π Main
β βββ π app.py
β βββ π best_model.joblib
β βββ π main.ipynb
β βββ π preprocessor.joblib
βββ βοΈ .gitignore
βββ π Proposal.pdf
βββ π README.md
π Dataset & Download Link
- Dataset Source: Kaggle (Customer Churn Dataset - Shahid Azeem).
- Note on Dataset Size: Since the full dataset is very large (~440k+ records, exceeding GitHub's file size limits), a representative sample dataset has been included in the repository. You can download and access the full training dataset from the original source or via the dataset link provided during the internship.
π How to Run the Project
- Run Machine Learning Pipeline: Open
Main/main.ipynb in Jupyter Notebook and execute cells to train models and generate .joblib files.
- Run FastAPI Server: Navigate to the
Main folder and start the local server using Uvicorn:
python -m uvicorn app:app --reload
Test API: Open your browser and go to http://127.0.0.1:8000/docs to test predictions via Swagger UI.
π€ Author
MehmoodCoder
π License
This project is open-source and available under the MIT License.
π€ Contributing
Contributions are welcome! If you'd like to improve the API, add new features, or optimize database queries, please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
** π€·ββοΈ Happy coding without chai ! β **