File size: 2,626 Bytes
72d0706
9e7b7e8
72d0706
 
 
28f839c
72d0706
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
title: "SegmentX: Behavioral Intelligence"
emoji: πŸ›οΈ
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
license: mit
---

# πŸ›οΈ SegmentX: E-Commerce Behavioral Intelligence Portal

SegmentX is a professional behavioral intelligence platform. It transforms e-commerce transactions into actionable segments using RFM and K-Means++. Features include revenue forecasting, Pareto analysis, churn probability, and product affinity mapping to maximize customer retention and mission-critical marketing ROI.

---

## πŸš€ Key Features

- **Behavioral Segmentation**: Automated RFM analysis and K-Means++ clustering for precision customer categorization.
- **Advanced Forecasting**: Monthly revenue trend analysis to identify seasonality and long-term growth patterns.
- **Predictive Analytics**: Individual-level Churn Probability (%) and Customer Lifetime Value (CLV) projections.
- **Market Basket Insights**: Segment-specific product affinity analysis highlighting top-selling items per cluster.
- **Strategic Visualization**: Heatmaps, 2D PCA projections, and Pareto-based revenue contribution charts.
- **Campaign Ready**: Interactive direct-to-CSV segment export for immediate use in email marketing tools.

---

## πŸ“ Project Structure

```
customer_segmentation/
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ raw/                # Cleaned transactions (UK-only)
β”‚   └── processed/          # Aggregated RFM features and scaled data
β”œβ”€β”€ docs/                   # Project documentation and instructions
β”œβ”€β”€ models/                 # Saved K-Means cluster model
β”œβ”€β”€ outputs/                # Visualization plots, segment mapping, and product affinity
β”œβ”€β”€ pipeline/               # Modular Python scripts (Cleaning, RFM, Training)
β”œβ”€β”€ app.py                  # Streamlit dashboard
β”œβ”€β”€ README.md               # User guide and setup instructions
β”œβ”€β”€ Procfile                # Deployment configuration
└── requirements.txt        # Required Python libraries
```

---

## πŸ› οΈ Installation & Usage

1. **Install Dependencies**:
   ```bash
   pip install -r requirements.txt
   ```
2. **Launch the Dashboard**:
   ```bash
   streamlit run app.py
   ```

---

## πŸš€ Deployment

This project is configured for one-click deployment to **Heroku**, **Streamlit Cloud**, or **Docker**.
- **Procfile**: Pre-configured for web dyno execution.
- **runtime.txt**: Specifies Python 3.10 usage.
- **.gitignore**: Optimized to handle large dataset storage.

---

## πŸ“„ License

This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.