Skip to content

huangyueranbbc/KmeansDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kmeans

1.选出k值,随机出k个起始质心点。

2.分别计算每个点和k个起始质点之间的距离,就近归类。

3.最终中心点集可以划分为k类,分别计算每类中新的中心点。

4.重复2,3步骤对所有点进行归类,如果当所有分类的质心点不再改变,则最终收敛。

  1. the K value was selected and K initial centroid points were randomly out.

  2. calculate the distance between each point and the starting point of K, and then classify them near.

  3. the final center point set can be divided into k classes, and the new center points in each class are calculated respectively.

  4. repeat 2,3 steps to classify all points, and eventually converge if the centroid points of all categories are no longer changed.