Skip to content

UmarQayyum16/Customer-Segmentation-with-Deep-Learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Customer Segmentation Project

Overview

This project focuses on customer segmentation using deep learning techniques. The primary goal is to understand and group customers based on their behavior and characteristics. The project involves exploratory data analysis (EDA), data preprocessing, model development, and evaluation.

Dataset

The dataset used for this project is sourced from HackerEarth HackLive: Customer Segmentation on Kaggle. It includes information about customer demographics, interactions, and subscription status.

Data Columns

  • id: Customer identifier
  • customer_age: Age of the customer
  • job_type: Type of job
  • marital: Marital status
  • education: Education level
  • default: Whether the customer has credit in default (yes/no)
  • balance: Customer's account balance
  • housing_loan: Has a housing loan? (yes/no)
  • personal_loan: Has a personal loan? (yes/no)
  • communication_type: Type of communication for the last contact
  • day_of_month: Day of the month when the last contact was made
  • month: Month when the last contact was made
  • last_contact_duration: Duration of the last contact in seconds
  • num_contacts_in_campaign: Number of contacts performed during the campaign
  • days_since_prev_campaign_contact: Days since the previous campaign contact
  • num_contacts_prev_campaign: Number of contacts performed in the previous campaign
  • prev_campaign_outcome: Outcome of the previous marketing campaign
  • term_deposit_subscribed: Binary variable indicating whether the customer subscribed to a term deposit (1) or not (0)

Project Workflow

  1. Exploratory Data Analysis (EDA):

    • Understand the structure of the dataset.
    • Handle missing values and outliers.
    • Visualize key features for insights.

    visualize_outliers correlation_matrix

  2. Data Preprocessing:

    • Handle categorical variables.
    • Address missing values through imputation.
    • Scale numerical features.

    scaled

  3. Model Development:

    • Split the dataset into training and testing sets.
    • Implement oversampling techniques to address class imbalance.
    • Build a neural network model using TensorFlow/Keras.
    • Compile and train the model.

    model_architecture

  4. Model Evaluation:

    • Evaluate the model using metrics such as accuracy, precision, recall, and F1-score.
    • Visualize the training process using TensorBoard.
    • Save the trained model for future use.

    training_process_epoch_loss training_process_epoch_accuracy classification_report confusion_matrix

After training and testing the model, here are the evaluation metrics:

  • Test Loss: 0.3063
  • Test Accuracy: 87.91%

These metrics provide insights into how well the model performs on unseen data. A lower test loss indicates better performance, and the test accuracy shows the percentage of correctly classified instances in the test set.

Conclusion

The customer segmentation model developed in this project provides insights into customer behavior and aids in targeted marketing efforts. By understanding distinct customer segments, businesses can tailor their strategies to enhance customer satisfaction and maximize returns.

Feel free to explore the code and adapt it for your specific needs. Contributions and suggestions are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published