A customer segmentation project using Python, RFM Analysis, and K-Means Clustering to group customers based on their purchasing behavior.
This project analyzes customer transaction data and segments customers into meaningful groups based on:
- Recency — How recently a customer purchased
- Frequency — How often a customer purchased
- Monetary Value — How much a customer spent
K-Means Clustering is then used to identify customer segments with similar purchasing behavior.
- Customer data preprocessing
- RFM feature calculation
- Customer segmentation using K-Means Clustering
- Identification of customer groups such as premium and loyal customers
- Data visualization and analysis
- Supabase integration for storing and accessing customer data
- Python
- Pandas
- NumPy
- Scikit-learn
- RFM Analysis
- K-Means Clustering
- Supabase
Customer Transaction Data
↓
Data Preprocessing
↓
RFM Analysis
↓
Feature Preparation
↓
K-Means Clustering
↓
Customer Segmentation
↓
Visualization & Analysis
📊 Customer Segments
The model can be used to identify behavior-based groups such as:
Premium Customers Loyal Customers Regular Customers At-Risk Customers
The exact segments depend on the dataset and clustering results.
🎯 What I Learned
Through this project, I strengthened my understanding of:
Data preprocessing with Pandas Customer behavior analysis using RFM Unsupervised machine learning K-Means Clustering Feature preparation and analysis Working with Supabase APIs Presenting machine learning results through a frontend interface 🔮 Future Improvements Automated customer segmentation pipeline Interactive analytics dashboard Improved cluster evaluation Additional customer behavior features More advanced clustering techniques 👨💻 Author
Sourav Sahoo
GitHub: https://github.com/sourav-07-s