{"id":21125474,"url":"https://github.com/parag000/customer-churn-prediction","last_synced_at":"2026-05-22T07:03:13.469Z","repository":{"id":262750392,"uuid":"888237266","full_name":"Parag000/Customer-Churn-Prediction","owner":"Parag000","description":"An end to end ML solution to predict customer churn, aiding businesses in identifying at-risk customers. This repository features a tuned LightGBM model, custom preprocessing, SMOTE for class balancing, and a user-friendly Streamlit app for predictions, emphasizing model optimization and deployment.","archived":false,"fork":false,"pushed_at":"2024-11-14T04:15:21.000Z","size":1123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T05:28:23.952Z","etag":null,"topics":["gridsearchcv","hyperparameter-tuning","lightgbm-classifier","pipeline","random-forest-classifier","smote-sampling","streamlit","winsorization"],"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/Parag000.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}},"created_at":"2024-11-14T03:35:44.000Z","updated_at":"2024-11-14T04:27:13.000Z","dependencies_parsed_at":"2024-11-14T07:15:42.611Z","dependency_job_id":null,"html_url":"https://github.com/Parag000/Customer-Churn-Prediction","commit_stats":null,"previous_names":["parag000/customer-churn-prediction"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Parag000%2FCustomer-Churn-Prediction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Parag000%2FCustomer-Churn-Prediction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Parag000%2FCustomer-Churn-Prediction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Parag000%2FCustomer-Churn-Prediction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Parag000","download_url":"https://codeload.github.com/Parag000/Customer-Churn-Prediction/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243573163,"owners_count":20312879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gridsearchcv","hyperparameter-tuning","lightgbm-classifier","pipeline","random-forest-classifier","smote-sampling","streamlit","winsorization"],"created_at":"2024-11-20T04:34:14.975Z","updated_at":"2026-05-22T07:03:08.418Z","avatar_url":"https://github.com/Parag000.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Customer Churn Prediction Using LightGBM Model 📉\n\nThis repository presents a comprehensive machine learning solution for customer churn prediction, designed to help businesses identify at-risk customers and proactively optimize retention strategies. The project employs a tuned LightGBM model within a tailored data pipeline, effectively handling class imbalance through SMOTE and engineering features to improve model performance.\n\nThis project showcases an end-to-end, production-ready approach to churn modeling, highlighting skills in model optimization, and deploying interactive machine learning applications—ideal for demonstrating expertise in building impactful, business-driven ML solutions.\n\n---\n\n## Project Notebook 📓\n\nExplore the code and methodology in the [Google Colab Notebook](https://colab.research.google.com/drive/1wN07WXLO-mUPvVJQV64q-6casNfe3lZv?usp=sharing). This notebook includes all the steps for data preprocessing, feature engineering, model training, and evaluation.\n\n---\n\n## Web Application 🖥️\n\n![Web Application Screenshot](WebUI.png)  \n*Streamlit interface that allows for interactive customer churn predictions.*\n\n---\n\n## Approach and Steps 🛠️\n\n1. **Data Preprocessing**: \n   - Created new features (`CustomerTenureEngagement`, `ContentConsumptionScore`) to improve model accuracy.\n   - Encoded `SubscriptionType` using ordinal encoding and applied one-hot encoding to other categorical features.\n   - Handled outliers and skewness with Winsorization and log transformations.\n\n2. **Model Training**: \n   - Utilized LightGBM for its efficiency with large datasets \n   - Addressed class imbalance with SMOTE to improve recall for the churn class.\n   - Tuned hyperparameters with GridSearchCV to optimize recall and F1 score.\n\n3. **Deployment**: \n   - Built a Streamlit app for churn predictions, processing user inputs through the full pipeline to deliver customer-specific churn probabilities.\n\n---\n\n## How to Run the Streamlit Application 🚀🚀\n\nFollow these steps to set up and run the application locally:\n\n### Step 1: Clone the Repository\nFirst, clone the repository and navigate to the project directory:\n```bash\ngit clone https://github.com/Parag000/Customer-Churn-Prediction.git\ncd customer-churn-prediction\n```\n\n### Step 2: Set Up Environment and Install Dependencies\n```bash\npython -m venv venv\nsource venv/bin/activate  # For Linux/MacOS\nvenv\\Scripts\\activate  # For Windows\n\npip install -r requirements.txt\n```\n\n### Step 3: Download Model and Pipeline Files\nDownload the following files and place them in the project root:\n\n- smote_lgbm.pkl: The pre-trained LightGBM model.\n- preprocessing_pipeline.pkl: The custom preprocessing pipeline.\nThese files are be provided as part of the repository assets.\n\n### Step 4: Run the Streamlit App\nStart the Streamlit application by running:\n```bash\nstreamlit run app.py\n```\nThis will open the application in your web browser\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparag000%2Fcustomer-churn-prediction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparag000%2Fcustomer-churn-prediction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparag000%2Fcustomer-churn-prediction/lists"}