Skip to content

This project performs customer segmentation using the K-Means clustering algorithm on mall customer data. By analyzing features like annual income and spending score, it groups customers into distinct clusters to help businesses understand customer behavior and enable data-driven marketing strategies.

Notifications You must be signed in to change notification settings

swarnabhaghosh/Mall-Customer-Segmentation-Data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ Customer Segmentation using K-Means Clustering

Segmenting mall customers based on their Annual Income and Spending Score using the K-Means clustering algorithm.


πŸ“Œ Project Objective

To perform unsupervised customer segmentation to help businesses understand different customer types and enable targeted marketing strategies.


πŸ“Š Dataset

  • Source: Mall_Customers.csv
  • Features:
    • CustomerID
    • Gender
    • Age
    • Annual Income (k$)
    • Spending Score (1-100)

βš™οΈ Technologies & Tools Used

  • Python 🐍
  • Pandas
  • NumPy
  • Matplotlib
  • Seaborn
  • Scikit-learn (KMeans Clustering)

πŸš€ Workflow

  1. Data Loading and Cleaning

    • Loaded dataset using pandas
    • Checked for missing values
  2. Feature Selection

    • Used only Annual Income and Spending Score for clustering
  3. Elbow Method for Optimal Clusters

    • Calculated WCSS for K=1 to 10
    • Plotted Elbow graph to find best K (optimal at K=5)
  4. K-Means Clustering

    • Applied KMeans(n_clusters=5)
    • Clustered customers into 5 segments
  5. Visualization

    • Plotted each cluster with distinct color
    • Marked centroids of clusters

πŸ“ˆ Visual Output

Customer Clusters Elbow Method
clusters elbow

πŸ“Œ Insights

  • Cluster 1: High income, low spenders
  • Cluster 2: Low income, high spenders
  • Cluster 3: Average income, average spenders
  • ...
  • Business can use this for targeted advertising, loyalty programs, and personalized offers

πŸ“ How to Run

git clone https://github.com/yourusername/customer-segmentation-kmeans.git
cd customer-segmentation-kmeans
pip install -r requirements.txt
jupyter notebook

About

This project performs customer segmentation using the K-Means clustering algorithm on mall customer data. By analyzing features like annual income and spending score, it groups customers into distinct clusters to help businesses understand customer behavior and enable data-driven marketing strategies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published