{"id":23491312,"url":"https://github.com/sanskaryo/churn-prediction-using_ann","last_synced_at":"2026-02-07T12:01:13.894Z","repository":{"id":269032494,"uuid":"879571921","full_name":"sanskaryo/Churn-Prediction-Using_ANN","owner":"sanskaryo","description":"Banking customer churn prediction using ann ","archived":false,"fork":false,"pushed_at":"2024-12-20T12:01:57.000Z","size":477,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-25T21:51:02.017Z","etag":null,"topics":["artificial-neural-networks","churn-prediction","customer","keras","python","scikit-learn","streamlit","tensorflow"],"latest_commit_sha":null,"homepage":"https://customer-churn-predict-ann.streamlit.app/","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/sanskaryo.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-10-28T06:50:24.000Z","updated_at":"2025-05-27T12:35:25.000Z","dependencies_parsed_at":"2024-12-20T13:18:36.415Z","dependency_job_id":"900a4443-3b42-4a3c-a22a-91de3d5a8830","html_url":"https://github.com/sanskaryo/Churn-Prediction-Using_ANN","commit_stats":null,"previous_names":["sanskaryo/churn-prediction-using_ann"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sanskaryo/Churn-Prediction-Using_ANN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanskaryo%2FChurn-Prediction-Using_ANN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanskaryo%2FChurn-Prediction-Using_ANN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanskaryo%2FChurn-Prediction-Using_ANN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanskaryo%2FChurn-Prediction-Using_ANN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanskaryo","download_url":"https://codeload.github.com/sanskaryo/Churn-Prediction-Using_ANN/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanskaryo%2FChurn-Prediction-Using_ANN/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29193999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["artificial-neural-networks","churn-prediction","customer","keras","python","scikit-learn","streamlit","tensorflow"],"created_at":"2024-12-25T01:19:21.377Z","updated_at":"2026-02-07T12:01:13.856Z","avatar_url":"https://github.com/sanskaryo.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# Customer Churn Prediction Using ANN Model\n\nThis project aims to predict customer churn using an Artificial Neural Network (ANN) model. The model is built using TensorFlow and Keras, and the application is deployed using Streamlit for an interactive user interface.\n\n## Table of Contents\n- [Project Overview](#project-overview)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Model Training](#model-training)\n- [Prediction](#prediction)\n- [File Descriptions](#file-descriptions)\n- [Dependencies](#dependencies)\n- [Acknowledgements](#acknowledgements)\n\n## Project Overview\nCustomer churn prediction is crucial for businesses to retain their customers. This project uses an ANN model to predict whether a customer is likely to churn based on various features such as credit score, geography, gender, age, balance, and more.\n\n## Installation\nTo run this project, you need to have Python installed on your machine. Follow the steps below to set up the project:\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/sanskaryo/Churn-Prediction-Using_ANN.git\n   cd Churn-Prediction-Using_ANN\n   ```\n\n2. Install the required dependencies:\n   ```sh\n   pip install -r requirements.txt\n   ```\n\n3. Run the Streamlit application:\n   ```sh\n   streamlit run app.py\n   ```\n\nThis will start a local Streamlit server where you can interact with the application through a web interface.\n\n## Usage\nAfter starting the Streamlit app, enter customer details (such as credit score, age, geography, etc.) in the input fields to predict whether the customer is likely to churn. The model processes the input and provides a real-time prediction of churn likelihood.\n\n## Model Training\nThe model was trained and evaluated in `experiments.ipynb`, a Jupyter notebook that includes the following steps:\n\n1. **Data Preprocessing**: Scaling numeric features, encoding categorical data (gender and geography), and preparing the dataset for ANN input.\n2. **Model Building**: Defining the ANN structure with input, hidden, and output layers tailored for binary classification.\n3. **Model Training**: Training the model on historical customer data, allowing it to learn patterns associated with churn.\n4. **Evaluation**: Assessing model performance using metrics like accuracy, precision, recall, and F1-score.\n\nThe trained model is saved as `model.keras`, which is then loaded in the `app.py` file for predictions.\n\n## Prediction\nThe `app.py` file serves as the main interface for making predictions. It performs the following tasks:\n\n- **Load the Model and Encoders**: The model, label encoders, and scaler are loaded.\n- **Process Input Data**: User inputs are scaled and encoded as needed.\n- **Generate Prediction**: The processed input data is fed into the model to obtain a prediction.\n- **Display Result**: The result (\"Churn\" or \"No Churn\") is shown on the app interface.\n\n## File Descriptions\n\n- **`app.py`**: The main Streamlit application for user interaction and predictions.\n- **`experiments.ipynb`**: Jupyter notebook that contains data exploration, preprocessing, model building, training, and evaluation code.\n- **`model.keras`**: The trained ANN model saved in Keras format, used for deployment.\n- **`label_encoder_gender.pkl`**: Pickle file containing the encoder for the gender feature.\n- **`onehot_encoder_geo.pkl`**: Pickle file containing the encoder for the geography feature.\n- **`scaler.pkl`**: Pickle file containing the scaler for numerical features.\n- **`requirements.txt`**: File listing all dependencies required to run the project.\n\n## Dependencies\nThis project requires the following Python libraries:\n\n- `tensorflow`\n- `pandas`\n- `numpy`\n- `scikit-learn`\n- `tensorboard`\n- `matplotlib`\n- `streamlit`\n- `scikeras`\n\nInstall these dependencies by running:\n```sh\npip install -r requirements.txt\n```\n\n## Acknowledgements\nThis project is based on tutorials from Krish Naik's Udemy course. Special thanks to Krish Naik for providing comprehensive guidance on building churn prediction models with machine learning.\n\n---\n## Screenshots\n\n1. **Screenshot 1**  \n   ![Screenshot 1](https://github.com/user-attachments/assets/31d59286-ccb3-45d8-9e6f-1dd4444cce27)\n\n2. **Screenshot 2**  \n   ![Screenshot 2](https://github.com/user-attachments/assets/8b8ec61c-93fd-4ae5-bd9a-dbb6a27e807d)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanskaryo%2Fchurn-prediction-using_ann","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanskaryo%2Fchurn-prediction-using_ann","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanskaryo%2Fchurn-prediction-using_ann/lists"}