首页 > 代码库 > 层次聚类与K-means

层次聚类与K-means

  1. Hierarchical clustering(层次聚类)

作用:Clustering organizes things that are close into groups

算法步骤:

a).Find closest two thing

b).Put them together

c).Find next closest

     算法结果:A tree showing how close things are to each other

        技术分享

http://gallery.r-enthusiasts.com/RGraphGallery.php?graph=79

 

  1. K-means

作用:Final estimate of cluster centroids

算法步骤:

a)Fix a number of clusters

b) Get “centroids” of each cluster

c)Assign things to closest centroid

d)Reclaculate centroids

     算法结果:按设定的cluster值分成相应和groups.

 技术分享

 

层次聚类与K-means