# Normalization/Standarization for Clustering visualization

I'm performing visualization of a dataset clustered with k-means. I compute a weight for each cluster and I draw a circle as big as its weight. But it seems like after the clustering some values are too high respect to the data set. For example the biggest weight is 1117797 while the smallest is just 2.75, I've performed normalization between [0,1] and the visualization due to that dissimilarity is not good.

Should I normalize data in a different way?, I've read about z-score but I'm not sure how to apply it in order to give less relevance to this big clusters.

Additional info: Average: 16213 Standard deviation: 110985.9

The problem I'm solving: I have around 500k text comments and they are represented in a vector space model using a Term frequency – Inverse document frequency matrix. In the end every document is represented as a vector where each dimension represents the weight of a term in the corpus.

Edit:

So far I've got the following: I consider a cluster an "outlier" of the data if its weight is greater than the average plus the standard deviation multiplied by 3. Formally is an outlier if satisfies:

$w_{i} >= \mu + \sigma * 3$

Then I do a scaling in [0,1] of the set of "outliers" and then multiply every element by $a * max_{w_{j} < \mu + \sigma * 3}(w_{j})$. It is, take the max of the "non outliers" and use it as a baseline to put another weight to the outlier points such that they remain bigger but not too much big. I've set $a = 1.7$ because it gives me nice graphical results but I am not sure this "experimental" method would work for different types of data (which may be the case in my problem).

Edit2:

Based on the Anony-Mousse suggestion I used the log function to smooth the differences between the weights, this gave some interesting results because indeed the clusters does not have such huge differences but they seem to have a very similiar size between them, I've added images to make it more clear:

Without any data standarization: With log scale: As Anony-Mousse suggested this is a "Zipfian" scenario but the log scale seems to smooth way to much the differences between the weigts, for example the big blue cluster should be much more big but allowing the rest of the clusters to be seen.

• What do you mean by the "weight for each cluster"? Jul 24, 2016 at 2:58
• Its the "importance" of the cluster, as every document is a vector I take the sum of every vector in a cluster and then sum all the components, that gaves a sense of the cluster "importance" that is what I call the weight. Jul 24, 2016 at 3:26
• I see. Why is that your measure of importance? It basically means that documents with more words are more important... is that really true for what you are doing? I.e. with a term-frequency matrix, the "importance" is the number of words in each document. This seems problematic since there are often cluster that pick up "small" documents i.e. whose vector is closer to the origin and others that pick up "large" documents i.e. those further from origin. I think something like the number of documents would scale better and give you a better idea of the importance of a cluster. Jul 24, 2016 at 22:01
• Not exactly, I am not doing only the term frequency matrix but adding Inverse document frequency such that kind of effect you are mentioning is neutralized, but indeed at some point the size of the documents impose some bias. Jul 24, 2016 at 23:56