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 ++ 


the Elbow Method:


圖中顯示: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       


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章