文件名称:matlab
介绍说明--下载内容均来自于网络,请自行研究使用
聚类算法,不是分类算法。分类算法是给一个数据,然后判断这个数据属于已分好的类中的具体哪一类。聚类算法是给一大堆原始数据,然后通过算法将其中具有相似特征的数据聚为一类。这里的k-means聚类,是事先给出原始数据所含的类数,然后将含有相似特征的数据聚为一个类中。所有资料中还是Andrew Ng介绍的明白。首先给出原始数据{x1,x2,...,xn},这些数据没有被标记的。初始化k个随机数据u1,u2,...,uk。这些xn和uk都是向量。根据下面两个公式迭代就能求出最终所有的u,这些u就是最终所有类的中心位置。-Clustering algorithm, not a classification algorithm. Classification algorithm is to give a figure, and then determine the data belonging to a specific class of good which category. Clustering algorithm is to give a lot of raw data, and then through the algorithm which has similar characteristics data together as a class. Here k-means clustering, is given in advance the number of classes contained in the raw data, then the data contain similar characteristics together as a class. All information presented in or Andrew Ng understand. Firstly, raw data {x1, x2, ..., xn}, the data is not labeled. K random initialization data u1, u2, ..., uk. These are the vectors xn and uk. According to the following two formulas can be obtained final iteration all u, u is the ultimate all these classes the center position.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
KMeans.m
main.m