{"id":20677195,"url":"https://github.com/jatin-mehra119/churn_modeling","last_synced_at":"2026-05-08T14:50:04.569Z","repository":{"id":246261369,"uuid":"818374854","full_name":"Jatin-Mehra119/Churn_modeling","owner":"Jatin-Mehra119","description":"This repository is dedicated to predicting customer churn using machine learning techniques. It includes comprehensive scripts for data preprocessing, model training, and evaluation, along with detailed visualizations and insights.","archived":false,"fork":false,"pushed_at":"2024-06-26T16:18:48.000Z","size":36821,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T18:54:42.167Z","etag":null,"topics":["classification-model","datavisualization","pandas","scikit-learn"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Jatin-Mehra119.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-06-21T17:54:35.000Z","updated_at":"2024-06-29T12:21:24.000Z","dependencies_parsed_at":"2024-06-26T23:24:35.186Z","dependency_job_id":null,"html_url":"https://github.com/Jatin-Mehra119/Churn_modeling","commit_stats":null,"previous_names":["jatin-mehra119/churn_modeling"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Jatin-Mehra119/Churn_modeling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jatin-Mehra119%2FChurn_modeling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jatin-Mehra119%2FChurn_modeling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jatin-Mehra119%2FChurn_modeling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jatin-Mehra119%2FChurn_modeling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jatin-Mehra119","download_url":"https://codeload.github.com/Jatin-Mehra119/Churn_modeling/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jatin-Mehra119%2FChurn_modeling/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260174133,"owners_count":22969871,"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":["classification-model","datavisualization","pandas","scikit-learn"],"created_at":"2024-11-16T21:14:48.063Z","updated_at":"2026-05-08T14:49:59.537Z","avatar_url":"https://github.com/Jatin-Mehra119.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Churn Modeling\n\nThis repository contains scripts for building and evaluating a model to predict customer churn. Customer churn refers to the loss of clients or customers. The project details the steps involved in data preprocessing, exploratory data analysis (EDA), feature engineering, model building, and evaluation.\n\n# Notebook Link- \nhttps://drive.google.com/file/d/1MrB7uxLFmWTElEld3xBp4pO1tReAGHr-/view?usp=sharing\n\n## Table of Contents\n\n1.  [Installation](#installation)\n2.  [Data Description](#data-description)\n3.  [Script Overview](#script-overview)\n4.  [Modeling Process](#modeling-process)\n5.  [Results](#results)\n6.  [Conclusion](#conclusion)\n7.  [References](#references)\n\n## Installation\n\nTo run the scripts locally, ensure you have the following dependencies installed:\n\n-   Python 3.x\n-   Pandas\n-   NumPy\n-   Scikit-learn\n-   Matplotlib\n-   Seaborn\n\nYou can install the required packages using the following command:\n\npip install pandas numpy scikit-learn matplotlib seaborn\n\n## Data Description\n\nThe dataset contains customer-related information. Features include:\n\n-   **CustomerID**: Unique identifier for each customer.\n-   **Geography**: Customer's geographical location.\n-   **Gender**: Customer's gender.\n-   **Age**: Customer's age.\n-   **Tenure**: Number of years the customer has been with the company.\n-   **Balance**: Account balance of the customer.\n-   **ProductsNumber**: Number of products the customer has with the company.\n-   **HasCrCard**: Whether the customer has a credit card.\n-   **IsActiveMember**: Whether the customer is an active member.\n-   **EstimatedSalary**: Estimated salary of the customer.\n-   **Exited**: Whether the customer has churned (target variable).\n\n## Script Overview\n\nThe project consists of the following scripts:\n\n1.  **LoadData.py**:\n    -   Script for loading and preparing the dataset.\n2.  **Preprocessor.py**:\n    -   Script for preprocessing the data.\n3.  **Trainer.py**:\n    -   Script for training various machine learning models.\n4.  **Main.py**:\n    -   Main script that orchestrates the workflow, including loading data, preprocessing, training models, and making predictions.\n\n## Modeling Process\n\nThe modeling process includes:\n\n-   **Data Splitting**: Dividing the data into training and testing sets to evaluate model performance.\n-   **Model Training**: Training various machine learning algorithms to find the best model.\n-   **Hyperparameter Tuning**: Using techniques like Random Search to optimize model parameters.\n-   **Model Evaluation**: Assessing models using cross-validation and performance metrics.\n\n## Results\n\n### Logistic Regression\n\n-   **Accuracy**: 0.80\n-   **Precision (Positive Class)**: 0.58\n-   **Recall (Positive Class)**: 0.18\n-   **F1-Score (Positive Class)**: 0.28\n-   **ROC-AUC**: 0.77\n\n### Random Forest Classifier\n\n-   **Accuracy**: 0.85\n-   **Precision (Positive Class)**: 0.72\n-   **Recall (Positive Class)**: 0.47\n-   **F1-Score (Positive Class)**: 0.57\n-   **ROC-AUC**: 0.85\n\n### Gradient Boosting Classifier\n\n-   **Accuracy**: 0.87\n-   **Precision (Positive Class)**: 0.78\n-   **Recall (Positive Class)**: 0.49\n-   **F1-Score (Positive Class)**: 0.60\n-   **ROC-AUC**: 0.87\n\n### AdaBoost Classifier\n\n-   **Accuracy**: 0.85\n-   **Precision (Positive Class)**: 0.71\n-   **Recall (Positive Class)**: 0.47\n-   **F1-Score (Positive Class)**: 0.57\n-   **ROC-AUC**: 0.85\n\n### Support Vector Machine (SVM)\n\n-   **Accuracy**: 0.85\n-   **Precision (Positive Class)**: 0.79\n-   **Recall (Positive Class)**: 0.42\n-   **F1-Score (Positive Class)**: 0.55\n-   **ROC-AUC**: 0.83\n\n### K-Nearest Neighbors Classifier\n\n-   **Accuracy**: 0.82\n-   **Precision (Positive Class)**: 0.60\n-   **Recall (Positive Class)**: 0.44\n-   **F1-Score (Positive Class)**: 0.51\n-   **ROC-AUC**: 0.78\n\n### Extra Trees Classifier\n\n-   **Accuracy**: 0.86\n-   **Precision (Positive Class)**: 0.75\n-   **Recall (Positive Class)**: 0.46\n-   **F1-Score (Positive Class)**: 0.57\n-   **ROC-AUC**: 0.85\n\n### MLP Classifier (Neural Networks)\n\n-   **Accuracy**: 0.86\n-   **Precision (Positive Class)**: 0.78\n-   **Recall (Positive Class)**: 0.45\n-   **F1-Score (Positive Class)**: 0.58\n-   **ROC-AUC**: 0.86\n\n## Conclusion\n\nThe **Gradient Boosting Classifier** is the most promising model with 87% accuracy. Random Forest, AdaBoost, SVM, Extra Trees, and MLP (neural network) also perform well, scoring around 85% to 86% accuracy. Logistic Regression and K-Nearest Neighbors Classifier score around 80% to 82% accuracy.\n\n## References\n\n-   [Scikit-learn Documentation](https://scikit-learn.org/stable/supervised_learning.html)\n-   [Seaborn Documentation](https://seaborn.pydata.org/tutorial.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjatin-mehra119%2Fchurn_modeling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjatin-mehra119%2Fchurn_modeling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjatin-mehra119%2Fchurn_modeling/lists"}