matlab k-means聚类分析我要分享

Matlab K-means clustering analysis

关注次数: 176

下载次数: 2

文件大小: 13.29 kB

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明: K-means算法是很典型的基于距离的聚类算法,采用距离作为相似性的评价指标,即认为两个对象的距离越近,其相似度就越大,算法过程如下: 输入:k, data[n]; (1) 选择k个初始中心点,例如c[0]=data[0],…c[k-1]=data[k-1]; (2) 对于data[0]….data[n],分别与c[0]…c[k-1]比较,假定与c[i]差值最少,就标记为i; (3) 对于所有标记为i点,重新计算c[i]={ 所有标记为i的data[j]之和}/标记为i的个数; (4) 重复(2)(3),直到所有c[i]值的变化小于给定阈值。


English Description:

K-means algorithm is a typical clustering algorithm based on distance. Distance is used as the evaluation index of similarity, that is, the closer the two objects are, the greater the similarity is


代码预览

相关推荐