https://github.com/captaincodercool/online-customer-segmentation-using-machine-learning

This project applies clustering algorithms to segment online retail customers based on behavior. It analyzes purchasing patterns, spending habits, and customer value, using KMeans and hierarchical clustering to uncover key segments, enabling targeted marketing strategies and business growth.

https://github.com/captaincodercool/online-customer-segmentation-using-machine-learning

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.0%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

This project applies clustering algorithms to segment online retail customers based on behavior. It analyzes purchasing patterns, spending habits, and customer value, using KMeans and hierarchical clustering to uncover key segments, enabling targeted marketing strategies and business growth.

Basic Info
  • Host: GitHub
  • Owner: CAPTAINCODERCOOL
  • Language: Jupyter Notebook
  • Default Branch: master
  • Size: 24.7 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme

README.md

🛍️ Online Customer Segmentation Using Machine Learning

This project focuses on analyzing customer data to segment users into distinct groups based on purchasing behavior, enabling companies to target marketing strategies more effectively. Machine learning techniques like KMeans and Hierarchical Clustering are applied to uncover meaningful customer segments.


🚀 Project Highlights

  • 📊 Customer behavioral analysis (spending, frequency, recency)
  • 🤖 Clustering using:
    • KMeans Clustering
    • Hierarchical Agglomerative Clustering (HAC)
  • 🧠 Elbow method and Dendrograms for optimal cluster selection
  • 📈 Data visualization using PCA and 2D/3D plotting
  • 🔍 Insight extraction for targeted marketing

🛠 Tech Stack

  • Python 3
  • Pandas
  • NumPy
  • Scikit-learn
  • Matplotlib
  • Seaborn
  • SciPy

🧰 Installation & Setup

1. Clone the Repository

```bash git clone https://github.com/yourusername/Online-Customer-Segmentation.git cd Online-Customer-Segmentation 2. Install Required Packages bash Copy Edit pip install -r requirements.txt 3. Run Analysis Scripts bash Copy Edit python customer_segmentation.py Or open and execute the Jupyter Notebook:

bash Copy Edit jupyter notebook CustomerSegmentation.ipynb 📂 Project Structure bash Copy Edit Online-Customer-Segmentation/ ├── data/ # Customer dataset (CSV) ├── notebooks/ # Jupyter notebooks for EDA and modeling │ └── CustomerSegmentation.ipynb ├── scripts/ # Python scripts │ └── customer_segmentation.py ├── visualizations/ # Saved graphs and plots ├── requirements.txt └── README.md 📊 Analysis Overview 📌 Exploratory Data Analysis (EDA) Understanding customer purchase patterns

Distribution of annual income, spending score, and other features

📌 Feature Engineering Normalization and standardization

Deriving new features like RFM (Recency, Frequency, Monetary value)

📌 Clustering Techniques KMeans Clustering

Elbow method to determine the optimal number of clusters

Hierarchical Clustering

Dendrogram analysis to decide cluster split points

📌 Visualization 2D scatter plots (Annual Income vs Spending Score)

3D cluster visualization

Heatmaps and pairplots

📈 Sample Visualizations 📊 Spending Score vs Income clusters

🎨 Cluster color maps

🧩 Dendrogram tree for hierarchical clusters

(You can add actual screenshots here)

💡 Future Improvements Apply DBSCAN for better anomaly detection

Deploy a web dashboard (using Flask or Streamlit) for real-time clustering

Integrate demographics and loyalty score to refine segments

Train a classification model to predict customer segments

🧠 Learnings Unsupervised machine learning with real-world customer data

Using clustering to drive marketing and personalization

Visual storytelling with Python

Importance of scaling and preprocessing before clustering

Owner

  • Login: CAPTAINCODERCOOL
  • Kind: user

GitHub Events

Total
  • Push event: 2
  • Create event: 3
Last Year
  • Push event: 2
  • Create event: 3