版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Pattern Classificationheight weight C-means clustering algorithm Hierarchical clusteringHierarchical clusteringLinear decision Pattern Classification1.1 C-means clustering algorithmThe flow chart of C-means clustering algorithm 1.2 Hierarchical clusteringThe flow chart of Hierarchical clustering 1.3
2、 Function M = mean (A):Find the average number or mean of the array Returns the average value of the elements in the different dimension along the array. If A is a vector, mean (A) returns the average value of the elements in the A. If A is a matrix, mean (A) is regarded as a vector, each column in
3、the matrix as a vector, the return of a row vector containing the average value of all elements of each column. If A is an array of multiple, mean (A) will be the first in the array of non single dimensional values as a vector, the average value of the return of each vector.M = mean (A, dim) Returns
4、 the average value of the elements in the dimension specified by the scalar dim along the A. For a matrix, mean (A, 2) is the column vector containing the average value of each row.C-means clustering: 1.4 Source Program and Simulation Result Simulation Result of C-means clustering Simulation Result
5、of C-means clustering Hierarchical clustering 1.4 Source Program and Simulation Result Simulation Result of Hierarchical clusteringSimulation Result of Hierarchical clustering1.5 Effect of initial value of different clustering on clustering results2.1 Linear decision Program first calls to randQ to
6、distinguish between training samples and testing samples, obtained through the related parameters and design the minimum Euclidean distance classifier, and used to detect all the test samples, finally, get every mistake rate .2.1 Linear decision Design a linear classifier with the minimum Euclidean
7、distance criterion: Discriminant function : Source Program of RandQ Source Program of Linear decision Simulation Result of Linear decision Simulation Result of Linear decision err_vg(将汽车误判为背景时的错判率);err_gv(将背景误判为汽车时的错判率);err_VG(将汽车误判为背景时的错判率);err_GV(将背景误判为汽车时的错判率);Program description: Pdist function
8、is used to calculate the distance between each other, and then the linkage function is used to establish the hierarchical structure tree. By comparing the classification results, the least error algorithm is selected for the class of inner square distance. The final call cluster function, the struct
9、ure of the tree to cluster, determine the final category.2.2 Hierarchical clustering2.2 Hierarchical clustering 1.pdist Y=pdist(X,metric) Description: use the metric method to calculate the distance between objects in the X data matrix. X: a m * n matrix, which is composed of M objects of the data s
10、et, the size of each object is n. Metric values are as follows: Euclidean:欧氏距离(默认); seuclidean:标准化欧氏距离; Mahalanobis:马氏距离 cityblock:布洛克距离; Minkowski:明可夫斯基距离;the Function of Hierarchical clustering: 2.linkage Z=linkage(Y,method) Input value Description: Y for the return of the pdist function M* (M-1)
11、/2 elements of the row vector, using the method parameter specified algorithm to calculate the system clustering tree. Method: can be valued as follows : single:最短距离法(默认); complete:最长距离法; average:未加权平均距离法; weighted: 加权平均法; centroid:质心距离法; median:加权质心距离法; ward:内平方距离法(最小方差算法)2.2 Hierarchical clusterin
12、gthe Function of Hierarchical clustering:3.cluster T=cluster(Z,) Description: according to the output of linkage function Z to create classification. In order to express the matrix Z, we can use more intuitive clustering number to display, the method is dendrogram (z), produced by the clustering num
13、ber is a n type tree, the bottom said sample, then a level to clustering, and eventually become the top. The vertical axis represents the height of column distance. In addition, you can set the number of clusters of the lowest number of samples, the default is 30, you can modify the dendrogram (Z, n
14、) parameter n to achieve, 1nM. Dendrogram (Z, 0) is the case of the table n=M, showing all the leaf nodes.2.2 Hierarchical clusteringthe Function of Hierarchical clustering:load feature_table;W=feature_table;Dist=pdist(W); 计算两两对象之间的距离Tree=linkage(Dist,ward); 建立层次化的结构树(类内平方距离最小误差)class=cluster(Tree,3
15、); 聚类class_1=find(class=1); 第一类class_2=find(class=2); 第二类class_3=find(class=3); 第三类n1=size(class_1);n2=size(class_2);n3=size(class_3); Source Program of Hierarchical clusteringBy clustering:Background error probability (sample as the background, misjudged other) err_bg = 0.0420;Auto error probabilit
16、y (sample for the car, misjudged other) err_car = 0.0400;Pedestrian error probability (sample for pedestrians, misjudged other) err_hm=0.002; Simulation Result of Hierarchical clustering Simulation Result of Hierarchical clusteringWhere the array class_1, class_2, class_3 store the data each other c
17、orresponding to the sample in the total sample set the index value. From which we can get the correct classification of the samples, which are divided into different categories.Summary: hierarchical clustering algorithm is no label learning, so there is no learning training process, directly according to the sample data in the feature space clustering, so the selection of suitable samples distribution characteristics of clustering algorithm is
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 大运河劳动合同用人单位物流2024年度智能物流系统合同
- 池塘租赁合同协议书
- 二零二四年度北京市装修工程供应链管理合同
- 二零二四年度船舶货物装卸合同
- 二零二四年度物业维修基金管理合同
- 2024年度存量房买卖合同(买卖双方身份证信息核实)
- 二零二四年货币赔偿及合同权益保障协议
- 二零二四年度艺人经纪合同范本(经纪活动范围与分成比例)
- 二零二四年度大型仓储物流搬迁合同
- 二零二四年度许可合同广播电视节目制作许可
- 集团公司企业各岗位廉洁风险点防控表格模板汇编(40篇)
- 统编版高中语文选择性必修上册 百年孤独 公开课教学课件
- 出货检验报告三篇
- 《大学》读书题库
- 世界社会主义五百年
- 表观遗传学-课件
- 小学数学二年级上册《认识时间》单元作业设计
- 学习乡村振兴知识竞赛100题及答案
- 铁路道岔基础
- 防沙治沙二期工程实施性施工组织设计
- 05s502图集阀门井安装图集
评论
0/150
提交评论