Customer Segmentation Using Cluster Analysis
View on GitHubSegments a 286,000-record Amazon sales dataset by demographic, geographic, and behavioral attributes, comparing five clustering techniques including K-Means, K-Modes, K-Prototype, Gaussian Mixture, and Agglomerative clustering to handle mixed numeric and categorical features.
A large e-commerce dataset of transaction and demographic records mixes numeric and categorical attributes, which most clustering algorithms cannot handle directly. The goal was to segment customers by demographic, geographic, and behavioral similarity in a way that respects that mix, using a real 286,000-record Amazon sales dataset rather than a synthetic one.
Five clustering techniques were applied to the same preprocessed dataset and compared directly against each other. K-Means, Agglomerative clustering, and Gaussian Mixture handled the numeric feature set, while K-Modes and K-Prototype specifically targeted the categorical and mixed-type attributes that the numeric-only methods can't use. The optimal number of clusters was determined per method rather than assumed, and every technique was scored with silhouette analysis on the same held-out data so the comparison was apples to apples rather than each method being tuned to its own favor.
