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.
https://github.com/conradbm/data_science/blob/master/fbi_crime_1980_2014/data_manipulations.m
K
that is good enough? Whats a good decision point on that? $\endgroup$