# Kmeans Clustering Returning Disproportional Clusters

I am having trouble understanding why Kmeans is returning so many unproportional clusters. For example, here are some of my test results in MATLAB after running my Kmeans algorithm on it:

raw_crime_data = table2array(T(:,start_crime_stats_index:end_crime_stats_index))
k=15 % then I tried k=5
idxk = kmeans(raw_crime_data,k,'Distance','sqeuclidean');
for i=1:k
length(unique(T.city(idxk(:) == i)))
end

k=15
9442
1
2
1
3
1
5
2738
1
6922
2
153
8
24
3
k=5
4299
1
5
10191
8


This issue just keeps happening.

Is it actually an issue?

Shouldn't I have proportional clusters?

Any pro tips on how to use Kmeans in such a way to group these data best?

It is just 10 completely numeric crime patterns.

I have also looked at this post, but it seems to be for text mining with Kmeans which is slightly different than clustering off of purely numeric data.

• Presumably, you have some outliers in your data. I would recommend that you take your k=5 data, find the point that was in a cluster by itself. Look at the distribution of distances from that point to all others. Look at the distribution of distances between all points. I would bet that they are very different distributions.
– G5W
Jan 17 '17 at 22:46
• This is true, the distributions are incredibly different. So eventually, without throwing out data, I just have to settle on a K that is good enough? Whats a good decision point on that?
– bmc
Jan 17 '17 at 23:15
• There is no clear answer to this. There is some guidance available. See This Cross Validated Post and This Stack Overflow Post. But ultimately, it is a choice you make depending on your problem. Both your k=5 and k=15 clusterings have a group with 8 points. Is that rubbish or a micro-cluster? You have to look at your data and your questions to decide.
– G5W
Jan 18 '17 at 0:17