Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Customer Segmentation: RFM & Seasonality Analysis πŸ“Š

This project focuses on identifying customer behavior patterns for a retail dataset using Unsupervised Machine Learning.

🎯 Business Objective

The goal is to segment customers to allow for targeted marketing strategies, identifying who are the "Champions", who are at risk of "Churn", and how seasonality (like Valentine's Day or Mother's Day) affects purchasing behavior.

πŸ› οΈ Data Pipeline & Technical Highlights

  • Data Cleaning: Implemented a robust cleaning script using RapidFuzz for fuzzy matching of city names (correcting typos like "Londre" to "London").
  • Feature Engineering: Created RFM metrics (Recency, Frequency, Monetary) and a monthly seasonality matrix.
  • Dimensionality Reduction: Used PCA (Principal Component Analysis) to visualize high-dimensional clusters in a 2D space.
  • Clustering: Applied the K-Means algorithm, using the Elbow Method and Silhouette Score to find the optimal number of clusters (k=5).

πŸ“ˆ Key Insights

  • Seasonal Peaks: Significant sales growth identified in February (Valentine's Day) and March (Mother's Day UK).
  • Customer Profiles: - Cluster VIP: High frequency and high spend.
    • Cluster Occasional: Low engagement, mostly active during specific holidays.

🧰 Tech Stack

  • Python: Pandas, NumPy, Scikit-learn, Matplotlib, Seaborn.
  • Algorithms: K-Means, PCA, Linear Regression (for quantity vs. total analysis).

πŸ”’ Data Privacy & Anonymization

  • This project uses a real-world retail dataset. All sensitive information (Customer names, emails, and specific addresses) has been strictly anonymized using MD5 hashing and categorization techniques to ensure privacy while maintaining data integrity for analytical purposes

About

Customer segmentation using RFM (Recency, Frequency, Monetary) and Seasonality analysis with Python and K-Means.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages