Skip to content

Aqibahmed12/Customer_Segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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

πŸ‘¨β€πŸ’» Author

Aqib Ahmed


πŸ“Œ Project Description

This project applies K-Means Clustering to segment customers of a retail store into distinct groups based on their Annual Income and Spending Score.

Customer segmentation is a key strategy in marketing and helps businesses:

  • Identify different types of customers
  • Create targeted marketing campaigns
  • Design loyalty programs
  • Personalize offers and discounts

πŸ“‚ Dataset

  • Name: Customer Segmentation Tutorial in Python
  • Source: Kaggle Dataset
  • File Used: Mall_Customers.csv

Dataset Columns:

  • CustomerID β†’ Unique customer ID
  • Gender β†’ Male / Female
  • Age β†’ Age of the customer
  • Annual Income (k$) β†’ Annual income in thousand dollars
  • Spending Score (1-100) β†’ Spending score assigned by the mall

βš™οΈ Steps Involved

  1. Load the dataset using Pandas.
  2. Select features β†’ Annual Income & Spending Score.
  3. Elbow Method β†’ Determine optimal number of clusters (k).
  4. Apply K-Means Clustering with chosen k.
  5. Visualize clusters using scatter plots with centroids.
  6. Interpret customer groups.

πŸ“Š Visualizations

Elbow Method

Helps to choose the optimal number of clusters (k).

Customer Segments

Clusters customers into groups such as:

  • High Income – High Spending (Luxury Shoppers πŸ’Ž)
  • Low Income – Low Spending (Budget Customers πŸ’΅)
  • High Income – Low Spending (Careful Customers 🧐)
  • Medium Income – Medium Spending (Average Customers πŸ™‚)
  • Low Income – High Spending (Impulsive Customers ⚑)

πŸš€ Tech Stack

  • Python
  • Pandas β†’ Data handling
  • Matplotlib / Seaborn β†’ Visualization
  • Scikit-Learn β†’ K-Means Clustering

πŸ† Results

The K-Means algorithm successfully divided customers into 5 meaningful groups, helping the retail store better understand customer behaviors and design targeted strategies.


πŸ“Œ How to Run

  1. Clone this repository:
    git clone https://github.com/Aqibahmed12/PRODIGY_ML_2.git
    cd PRODIGY_ML_2
  2. Install dependencies:
    pip install pandas matplotlib seaborn scikit-learn
  3. Run the notebook:
    jupyter notebook Task-02_KMeans_Customer_Segmentation.ipynb
    
    

About

πŸ›οΈ This project applies K-Means Clustering to segment customers of a retail store into distinct groups based on their Annual Income and Spending Score.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors