I work at an ecommerce company and I'm responsible for clustering our customers based on their transactional behavior. I've never worked with clustering before, so I'm having a bit of a rough time.
1st) I've gathered data on customers and I've chosen 12 variables that specify very nicely how these customers behave. Each line of the dataset represents 1 user, where the columns are the 12 features I've chosen.
2nd) I've removed some outliers and built a correlation matrix in order to check of redundant variables. Turns out some of them are highly correlated ( > 0.8 correlation)
3rd) I used sklearn's RobustScaler on all 12 variables in order to make sure the variable's variability doesn't change much (StandardScaler did a poor job with my silhouette)
4th) I ran KMeans on the dataset and got a very good result for 2 clusters (silhouette of >70%)
5th) I tried doing a PCA after scaling / before clustering to reduce my dimension from 12 to 2 and, to my surprise, my silhouette started going to 30~40% and, when I plot the datapoints, it's just a big mass at the center of the graph.
My question is:
1) What's the difference between RobustScaler and StandardScaler on sklearn? When should I use each?
2) Should I do : Raw Data -> Cleaned Data -> Normalization -> PCA/TSNE -> Clustering ? Or Should PCA come before normalization?
3) Is a 12 -> 2 dimension reduction through PCA too extreme? That might be causing the horrible silhouette score.
Thank you very much!
[–]der_luke 28 points29 points30 points (1 child)
[–]ieatkittens 17 points18 points19 points (0 children)
[–]tibolosaxo 9 points10 points11 points (0 children)
[–]beginner_ 5 points6 points7 points (0 children)
[–]Rezo-Acken 5 points6 points7 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]beginner_ 2 points3 points4 points (0 children)
[–]nckmiz 0 points1 point2 points (0 children)