Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -11,3 +11,71 @@ short_description: 'customer segmentation using KMeans '
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
14 |
+
|
15 |
+
# Customer Segmentation Project
|
16 |
+
|
17 |
+
## Overview
|
18 |
+
This project focuses on customer segmentation using KMeans clustering and RFM (Recency, Frequency, Monetary) analysis. By dividing customers into distinct segments, businesses can better understand their customer base and target specific groups with personalized strategies.
|
19 |
+
|
20 |
+
---
|
21 |
+
|
22 |
+
## Objectives
|
23 |
+
- Segment customers into meaningful groups using KMeans clustering.
|
24 |
+
- Perform RFM analysis to understand customer behavior.
|
25 |
+
- Identify key customer segments such as Loyal Customers, Champions, Risk Customers, and New Customers.
|
26 |
+
|
27 |
+
---
|
28 |
+
|
29 |
+
## Project Workflow
|
30 |
+
1. **RFM Analysis**:
|
31 |
+
- Computed Recency, Frequency, and Monetary values for each customer.
|
32 |
+
- Created 5 bins for each RFM metric based on quantiles.
|
33 |
+
2. **KMeans Clustering**:
|
34 |
+
- Used the processed RFM data to create 4 clusters.
|
35 |
+
- Determined the optimal number of clusters using methods like the elbow method or silhouette score.
|
36 |
+
3. **Data Analysis**:
|
37 |
+
- Analyzed each cluster to identify patterns and insights.
|
38 |
+
- Focused on understanding key customer groups:
|
39 |
+
- **Loyal Customers**
|
40 |
+
- **Champions**
|
41 |
+
- **At Risk Customers**
|
42 |
+
- **New Customers**
|
43 |
+
|
44 |
+
---
|
45 |
+
|
46 |
+
## Key Results
|
47 |
+
- Clear segmentation of customers into 4 clusters.
|
48 |
+
- Detailed insights into customer groups:
|
49 |
+
- **Loyal Customers**: High frequency and monetary value, recent purchases.
|
50 |
+
- **Champions**: Very high monetary value and frequency.
|
51 |
+
- **At Risk Customers**: Low recency and frequency, indicating potential churn.
|
52 |
+
- **New Customers**: Recently acquired, low frequency and monetary value.
|
53 |
+
|
54 |
+
---
|
55 |
+
|
56 |
+
## Technologies Used
|
57 |
+
- **Python**: Data analysis and clustering.
|
58 |
+
- **Libraries**:
|
59 |
+
- `pandas`, `numpy` for data manipulation.
|
60 |
+
- `matplotlib`, `seaborn` `plotly`for data visualization.
|
61 |
+
- `sklearn` for KMeans clustering.
|
62 |
+
|
63 |
+
---
|
64 |
+
## Create a Virtual Environment
|
65 |
+
```
|
66 |
+
python -m venv venv
|
67 |
+
```
|
68 |
+
Activate the Virtual Environment in Windows
|
69 |
+
```
|
70 |
+
venv\Scripts\activate
|
71 |
+
```
|
72 |
+
|
73 |
+
## Install Dependencies
|
74 |
+
```
|
75 |
+
pip install -r requirements.txt
|
76 |
+
```
|
77 |
+
|
78 |
+
## Run the Project
|
79 |
+
```
|
80 |
+
streamlit run app.py
|
81 |
+
```
|