k-Means的陷阱

k-Means的5个step(how did it do that?):

step 1 : choose the number K of clusters

step 2 : select at random k points , the centroids (not necessarily from your dataset )

step 3 : Assign each data point to the closest centroid (that from k clusters)

step 4 : compute and place the new centroid of each cluster

step 5 : reassign each data point to the new closest centroid.

if any reassignment took place(Your Model is Ready), go to step 4 ,otherwise go to FIN

k-Means random Initialization trap:choosing the right number of clusters


the solution is k-means ++ 

k-Means的陷阱


the Elbow Method:

k-Means的陷阱

图中显示:k-Means中选择3个cluster时,WCSS距离值改变的趋势基本不明显,于是选择K=3

参考博文:

https://blog.csdn.net/u011730199/article/details/78108263 

https://www.cnblogs.com/sharon123/p/6828853.html    



王家林老师人工智能AI第23课 老师微信13928463918