Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chaitanyak77/churn_prediction_ann
This repository contains a comprehensive Python script for building and training an Artificial Neural Network (ANN) model to predict customer churn using customer data. The code includes extensive data preprocessing steps, such as scaling, one-hot encoding, and visualization, to ensure the model's accuracy and effectiveness.
https://github.com/chaitanyak77/churn_prediction_ann
artificial-neural-network datapreprocessing deep-learning-algorithms visualizations
Last synced: about 2 months ago
JSON representation
This repository contains a comprehensive Python script for building and training an Artificial Neural Network (ANN) model to predict customer churn using customer data. The code includes extensive data preprocessing steps, such as scaling, one-hot encoding, and visualization, to ensure the model's accuracy and effectiveness.
- Host: GitHub
- URL: https://github.com/chaitanyak77/churn_prediction_ann
- Owner: ChaitanyaK77
- License: mit
- Created: 2023-09-10T05:03:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-10T05:05:55.000Z (over 1 year ago)
- Last Synced: 2023-09-10T06:19:13.206Z (over 1 year ago)
- Topics: artificial-neural-network, datapreprocessing, deep-learning-algorithms, visualizations
- Language: Jupyter Notebook
- Homepage:
- Size: 305 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Churn_Prediction_ANN
This repository contains a comprehensive Python script for building and training an Artificial Neural Network (ANN) model to predict customer churn using customer data. The code includes extensive data preprocessing steps, such as scaling, one-hot encoding, and visualization, to ensure the model's accuracy and effectiveness.## Getting Started
To run this code, you will need to have Python installed on your system. Additionally, make sure you have the following libraries installed:
- pandas
- numpy
- matplotlib
- scikit-learn
- tensorflow
- seaborn (for visualization)You can install these libraries using `pip`:
```bash
pip install pandas numpy matplotlib scikit-learn tensorflow seaborn
```## Usage
1. Clone this repository to your local machine or open it in a Jupyter Notebook environment.
2. Make sure to upload your dataset (`Churn_pred_data.csv`) to the appropriate location or specify the correct file path in the code.
3. Open the script and run each code block sequentially. Here's a brief overview of what each section of the code accomplishes:
- **Data Loading**: The code starts by loading the dataset from a CSV file using Pandas and displays basic information about the data.
- **Data Preprocessing**: This section includes extensive data preprocessing steps, such as handling missing values, encoding categorical features using one-hot encoding, scaling numeric features using Min-Max scaling, and visualizing data distributions.
- **Neural Network Model**: A feedforward neural network model is defined using TensorFlow and Keras. The architecture includes multiple layers with ReLU activation functions and a final sigmoid output layer for binary classification. You can customize the architecture and hyperparameters as needed.
- **Model Training**: The model is compiled with the Adam optimizer and binary cross-entropy loss function. It is then trained on the preprocessed data using a training and validation split.
- **Model Evaluation**: The trained model is evaluated on a test dataset, and comprehensive classification metrics, including accuracy, precision, recall, F1-score, and a confusion matrix with a heatmap visualization, are computed and displayed.
4. Feel free to modify the code to suit your specific dataset or experiment with different neural network architectures and preprocessing techniques.