View Live Demo

Customer Segmentation & Business Insights โ€” Mall Customer Segmentation Dashboard

Targeted marketing and customer understanding are crucial drivers of business growth. To unlock these insights, I designed and developed the Mall Customer Segmentation Dashboard, an interactive, premium analytics web application built with Streamlit and Plotly. The application allows business analysts to explore, profile, and target customer segments on the fly using unsupervised machine learning. In addition, it implements a unique hybrid pipeline integrating a supervised proxy classifier to solve real-world clustering challenges, such as handling out-of-sample data points for algorithms that don't natively support them.

๐Ÿš€ Key Features

๐Ÿ› ๏ธ Technology Stack

๐Ÿง  Deep Dive: The Supervised KNN Wrapper

A core challenge in unsupervised learning is deploying models. While K-Means projects centroids that make it easy to find the closest cluster for a new data point, algorithms like DBSCAN (density-based) and Hierarchical/Agglomerative (connectivity-based) do not define mathematical centroids or projection matrices for predicting new points.

To resolve this, the pipeline wraps the clustering outputs with a supervised K-Nearest Neighbors (KNN) classifier. Whenever the user adjusts clustering settings, the application fits the clustering model, extracts the labels, and dynamically trains a 3-NN classifier using the scaled demographics as features and the cluster assignments as targets. When a new customer profile is input, the KNN wrapper acts as a proxy, identifying the most appropriate cluster assignment instantly.

๐ŸŒ Dashboard Workspaces & Preview

1. ๐Ÿ“ˆ Dashboard & Insights

Displays overall database metrics and lists details for each segment discovered, including population size, averages, and tailored business strategies.

Mall Customer Segmentation Dashboard - Dashboard & Insights

2. ๐Ÿ“Š Exploratory Data Analysis

Visualizes variables in 2D or 3D scatter plots with point bubble sizes representing age, variable distributions, and pie/bar chart representation of cohort market share.

Mall Customer Segmentation Dashboard - Exploratory Data Analysis

3. ๐ŸŽฏ Single Predictor

Allows entry of a new customer's age, gender, annual income, and spending score. It scales the features, runs them through the KNN wrapper, and displays comparative gauge charts.

Mall Customer Segmentation Dashboard - Single Predictor

4. ๐Ÿ“ Batch Segmentation

Enables bulk uploads of CSV data, segments cohorts instantly, displays overall breakdown distributions, and lets you download the results as a new CSV.

Mall Customer Segmentation Dashboard - Batch Segmentation

๐Ÿงช Try It Live & View Code

Click here to launch the live Streamlit Dashboard

View the complete codebase on GitHub


๐Ÿ”— Connect with Me
๐ŸŒ www.tauqueeralam.com
๐Ÿ“ฑ LinkedIn | GitHub

View the live demo below:

View Live Demo

Discussion