limitations to -means clustering so there are some limitations to -means clustering here they are choosing kfirst of allwe need to choose the right value of kand that' not straightforward thing to do at all the principal way of choosing is to just start low and keep increasing the value of depending on how many groups you wantuntil you stop getting large reductions in squared error if you look at the distances from each point to their centroidsyou can think of that as an error metric at the point where you stop reducing that error metricyou know you probably have too many clusters so you're not really gaining any more information by adding additional clusters at that point avoiding local minimaalsothere is problem of local minima you could just get very unlucky with those initial choices of centroids and they might end up just converging on local phenomena instead of more global clustersso usuallyyou want to run this few times and maybe average the results together we call that ensemble learning we'll talk about that more little bit later onbut it' always good idea to run -means more than once using different set of random initial values and just see if you do in fact end up with the same overall results or not labeling the clustersfinallythe main problem with -means clustering is that there' no labels for the clusters that you get it will just tell you that this group of data points are somehow relatedbut you can' put name on it it can' tell you the actual meaning of that cluster let' say have bunch of movies that ' looking atand -means clustering tells me that bunch of science fiction movies are over herebut it' not going to call them "science fictionmovies for me it' up to me to actually dig into the data and figure outwellwhat do these things really have in commonhow might describe that in englishthat' the hard partand -means won' help you with that so againscikit-learn makes it very easy to do this let' now work up an example and put -means clustering into action