|
原帖由 francisfang 于 2008-4-24 11:56 发表
如何在matlab上实现K-均值聚类方法呢?有相应的函数吗?谢谢?
matlab里有这个函数
help kmeans
IDX = kmeans(X,k) partitions the
points in the n-by-p data matrix X into k clusters.
This iterative partitioning minimizes the sum, over all clusters, of the within-cluster
sums of point-to-cluster-centroid distances. Rows of X correspond
to points, columns correspond to variables. kmeans returns
an n-by-1 vector IDX containing
the cluster indices of each point. By default, kmeans uses
squared Euclidean distances. |
|