{"id":26234804,"url":"https://github.com/sayed-ashfaq/customer-churn-prediction","last_synced_at":"2026-04-24T11:08:30.381Z","repository":{"id":281568642,"uuid":"945672473","full_name":"sayed-ashfaq/Customer-Churn-Prediction","owner":"sayed-ashfaq","description":"This project predicts customer churn (whether a customer will leave the service or not) using machine learning models. The model is deployed using Flask, allowing users to upload a CSV file and get predictions.","archived":false,"fork":false,"pushed_at":"2025-07-31T07:39:12.000Z","size":4716,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-30T19:44:15.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sayed-ashfaq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-09T23:57:15.000Z","updated_at":"2025-07-31T07:39:16.000Z","dependencies_parsed_at":"2025-07-31T09:21:58.411Z","dependency_job_id":"fad98ebe-c5c6-4416-80e8-56735f6551ab","html_url":"https://github.com/sayed-ashfaq/Customer-Churn-Prediction","commit_stats":null,"previous_names":["sayed-ashfaq/customer-churn-prediction"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sayed-ashfaq/Customer-Churn-Prediction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayed-ashfaq%2FCustomer-Churn-Prediction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayed-ashfaq%2FCustomer-Churn-Prediction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayed-ashfaq%2FCustomer-Churn-Prediction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayed-ashfaq%2FCustomer-Churn-Prediction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sayed-ashfaq","download_url":"https://codeload.github.com/sayed-ashfaq/Customer-Churn-Prediction/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayed-ashfaq%2FCustomer-Churn-Prediction/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32220362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T10:26:35.452Z","status":"ssl_error","status_checked_at":"2026-04-24T10:25:27.643Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-13T02:28:51.751Z","updated_at":"2026-04-24T11:08:25.370Z","avatar_url":"https://github.com/sayed-ashfaq.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"## **Customer Churn Prediction using Flask \u0026 Machine Learning**  \n\n### **Project Overview**  \nThis project predicts **customer churn** (whether a customer will leave the service or not) using machine learning models. The model is deployed using **Flask**, allowing users to upload a CSV file and get predictions.  \n\n### **Technologies Used**  \n- **Python** (For model training and prediction)  \n- **Flask** (For deployment)  \n- **Pandas, NumPy** (For data processing)  \n- **Scikit-learn, XGBoost, DecisionTree, RandomForest** (For machine learning)  \n- **SMOTE \u0026 ENN** (For handling imbalanced data)  \n\n### **Project Workflow**  \n1. **Data Preprocessing:**  \n   - Handled missing values  \n   - Converted categorical data using **One-Hot Encoding**  \n   - Scaled numerical data  \n   - Applied **SMOTEENN** to balance the dataset  \n2. **Model Training:**  \n   - Tried different models (**Decision Tree, XGBoost, Random Forest**)  \n   - Selected **Random Forest** as the final model (best accuracy ~98%)  \n   - Saved the trained model using **Pickle**  \n3. **Flask Web App:**  \n   - Users can upload a CSV file  \n   - The model processes the data and returns predictions  \n4. **Deployment:**  \n   - Flask app can be tested **locally** using Anaconda/Command Prompt  \n   - Can be hosted on cloud platforms (like **Render, Heroku, or AWS**)  \n\n### **How to Run the Project Locally**  \n#### **Step 1: Clone the Repository**  \n```bash\ngit clone https://github.com/sayed-ashfaq/Customer-Churn-Prediction.git\ncd Customer-Churn-Prediction\n```\n\n#### **Step 2: Create a Virtual Environment (Recommended)**\n```bash\nconda create --name churn_env python=3.9\nconda activate churn_env\n```\n\n#### **Step 3: Install Dependencies**  \n```bash\npip install -r requirements.txt\n```\n\n#### **Step 4: Run Flask App**  \n```bash\npython app.py\n```\nThe app will start running at **http://127.0.0.1:5000/**  \n\n#### **Step 5: Upload a CSV File**  \n- Go to the browser and open **http://127.0.0.1:5000/**  \n- Upload a **CSV file** with customer data  \n- The model will predict whether the customer will **churn or not**  \n\n### **Sample Test Data**  \n- It is uploaded as test_data in the git repo\n\n\n### **Next Steps**  \n- Deploy the Flask app to **Render, AWS, or Heroku**  \n- Improve the UI using **HTML \u0026 CSS**  \n- Experiment with more ML models for better accuracy  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayed-ashfaq%2Fcustomer-churn-prediction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsayed-ashfaq%2Fcustomer-churn-prediction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayed-ashfaq%2Fcustomer-churn-prediction/lists"}