Great choice, Sumit! Unsupervised learning is often underrepresented on resumes, so a well-executed end-to-end unsupervised ML project with model comparison + deployment will make your portfolio stand out.
Customer Segmentation System: An End-to-End Unsupervised Machine Learning Pipeline with Web App Deployment
This project implements an end-to-end unsupervised machine learning system to segment customers based on behavioral and demographic data. It showcases multiple clustering algorithms, dimensionality reduction techniques, and an interactive Streamlit app for dynamic cluster analysis — all containerized and ready for cloud deployment.
Businesses often struggle to understand their diverse customer base. The goal is to group customers into similar segments so that companies can:
- Personalize marketing
- Design targeted promotions
- Improve customer retention strategies
-
Features:
CustomerIDGenderAgeAnnual IncomeSpending Score
You can also upgrade this with e-commerce or telecom customer datasets (optional).
- Histograms, pairplots, violin plots (age, income, gender)
- Correlation matrix to identify informative features
- One-hot encoding for
Gender - Standardization of numerical features
- Dimensionality reduction with PCA or t-SNE for visualization
| Algorithm | Use Case |
|---|---|
| K-Means | Baseline hard clustering |
| Hierarchical Clustering (Agglomerative) | Tree-based segmentation |
| DBSCAN | Density-based detection (good for outliers) |
| Gaussian Mixture Models (GMM) | Probabilistic clustering |
| (Optional) Autoencoders | Deep clustering for nonlinear patterns |
- Silhouette Score
- Davies–Bouldin Index
- Calinski–Harabasz Score
- Elbow method & Dendrogram for cluster tuning
- 2D PCA/t-SNE cluster plots
- Interactive Streamlit UI with cluster count selector and segment interpretation
- Input sliders to filter and explore different segments
- Display cluster characteristics (mean income, spending habits)
- Visualize cluster plots and statistics
-
Dockerfile to containerize the app
-
Optional deployment to:
- Streamlit Cloud
- Render
- GCP Cloud Run
- AWS EC2
customer-segmentation/
├── app/
│ └── streamlit_app.py
├── data/
│ └── mall_customers.csv
├── models/
│ └── kmeans.pkl
│ └── scaler.pkl
├── notebooks/
│ └── EDA.ipynb
│ └── Clustering_Models.ipynb
├── Dockerfile
├── requirements.txt
├── README.md
✅ Built and deployed an end-to-end unsupervised machine learning system for customer segmentation using K-Means, DBSCAN, Hierarchical Clustering, and GMM. Evaluated clustering quality with silhouette and Davies–Bouldin scores. Deployed an interactive Streamlit app with Docker to explore customer segments dynamically.
- Add SHAP for GMM soft clusters
- Use Elbow + Silhouette combined cluster optimization
- Combine with supervised models (semi-supervised learning)