Skip to content

Client-Retention-Insight is a churn classification project to predict whether the customer will Exited or not using the ANN implementation by tensorflow. We have also performed regression on the EstimatedSalary feature and done the HyperparameterTunning to find the best possible parameters for the model.

License

Notifications You must be signed in to change notification settings

SINGHxTUSHAR/Client-Retention-Insight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub license GitHub contributors GitHub issues GitHub pull-requests PRs Welcome

GitHub watchers GitHub forks GitHub stars

Open in Visual Studio Code

Client-Retention-Insight:

preview Image

"Client-Retention-Insight" is a machine learning project designed to predict customer churn using an Artificial Neural Network (ANN) implemented in TensorFlow. The primary objective is determining whether a customer will likely exit based on various features such as account balance, tenure, credit score, and estimated salary. Additionally, regression analysis is conducted on the Estimated Salary feature to explore its impact, and Hyperparameter Tuning is performed to optimize the ANN model for better accuracy. This project is crucial for businesses, particularly in banking, telecom, and subscription-based services, where customer retention is a key metric for profitability. By predicting churn early, businesses can take proactive measures to retain valuable customers.

Workflow of the Project:

The workflow of the Client-Retention-Insight project follows a structured pipeline for data processing, model building, evaluation, and optimization. Below is a step-by-step breakdown:

  1. Data Collection & Preprocessing Dataset: The dataset contains customer-related features such as CreditScore Geography Gender Age Tenure Balance Number of Products Has Credit Card Is Active Member Estimated Salary Exited (Target variable: 1 for churned customers, 0 for retained customers) Handling Missing Values: Check for null values and handle them accordingly. Feature Encoding: Convert categorical variables (e.g., "Geography," "Gender") into numerical representations using one-hot encoding. Feature Scaling: Normalize or standardize numerical features (e.g., CreditScore, Balance, Estimated Salary) using MinMaxScaler to improve ANN performance. Splitting Data: Divide the dataset into training and testing sets (e.g., 80%-20% split).

  2. Exploratory Data Analysis (EDA) Visualize the distribution of features using histograms, box plots, and KDE plots. Analyze correlations between variables using heatmaps. Identify patterns and trends in the data that influence customer churn.

  3. Regression on EstimatedSalary Feature Objective: To examine how salary impacts customer churn probability. Model Used: Linear Regression or Polynomial Regression. Analysis: Understand the trend between EstimatedSalary and the probability of churn.

  4. Building the ANN Model Architecture: Input Layer: Accepts the preprocessed feature set. Hidden Layers: Multiple fully connected layers with ReLU activation. Output Layer: Uses Sigmoid activation to classify whether the customer will exit (1) or stay (0). Loss Function: Binary Cross-Entropy. Optimizer: Adam optimizer is used for efficient weight updates. Evaluation Metric: Accuracy, Precision, Recall, and F1-score.

  5. Model Training & Evaluation Train the ANN model using the training dataset. Validate model performance using test data. Plot the loss vs. epochs and accuracy vs. epochs graphs to monitor training progress. Compute confusion matrix, ROC-AUC curve, and classification report.

  6. Hyperparameter Tuning Optimize ANN architecture using Grid Search or Random Search. Parameters tuned: Number of layers Number of neurons per layer Learning rate Batch size Dropout rate Select the best-performing combination of hyperparameters to improve model performance.

  7. Model Deployment & Insights Once trained and optimized, the model is tested on new customer data. Predictions help businesses develop targeted retention strategies. Model deployment options: Web-based API (Flask/Django) Integration into business dashboards

Workflow Diagram

Here is a diagram representing the end-to-end workflow of the Client-Retention-Insight project:

+----------------------+
| Data Collection     |
+----------------------+
           ↓
+----------------------+
| Data Preprocessing  |
| - Handling Missing  |
| - Encoding Features |
| - Scaling Features  |
+----------------------+
           ↓
+----------------------+
| Exploratory Data    |
| Analysis (EDA)      |
+----------------------+
           ↓
+----------------------+
| Regression on       |
| EstimatedSalary     |
+----------------------+
           ↓
+----------------------+
| ANN Model Training  |
| - Input Layer       |
| - Hidden Layers     |
| - Output Layer      |
+----------------------+
           ↓
+----------------------+
| Model Evaluation    |
| - Accuracy          |
| - Precision-Recall  |
| - ROC Curve         |
+----------------------+
           ↓
+----------------------+
| Hyperparameter      |
| Tuning              |
+----------------------+
           ↓
+----------------------+
| Deployment &        |
| Business Insights   |
+----------------------+

Requirements💻 :

Ensure you have the following dependencies installed:

  • Python (version 3.11.x || 3.12.x)
  • IDE: VS-CODE or collab
  • Virtual-environment(venv)
  • Other dependencies (refer to the requirement.txt)

You can install the required Python packages using:

pip install -r requirement.txt

Setup 💿:

  • Clone the repository:
git clone https://github.com/SINGHxTUSHAR/NextWordAI.git
cd Client-Retention-Insight
  • Create a virtual environment (optional but recommended):
python -m venv venv
  • Activate the virtual environment:
    • On Windows:
    venv\Scripts\activate
    • On macOS/Linux:
    source venv/bin/activate

Contributing 📌:

If you'd like to contribute to this project, please follow the standard GitHub fork and pull request process. Contributions, issues, and feature requests are welcome!

Suggestion 🚀:

If you have any suggestions for me related to this project, feel free to contact me at tusharsinghrawat.delhi@gmail.com or LinkedIn.

License 📝:

This project is licensed under the MIT License - see the LICENSE file for details.

About

Client-Retention-Insight is a churn classification project to predict whether the customer will Exited or not using the ANN implementation by tensorflow. We have also performed regression on the EstimatedSalary feature and done the HyperparameterTunning to find the best possible parameters for the model.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published