用matlab实现聚类分析

  • 格式:ppt
  • 大小:81.50 KB
  • 文档页数:8

下载文档原格式

  / 8
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Company name
www.themegallery.com
定义变量之间的连接 Z=linkage(Y)
Z = linkage(Y,'method') ‘method’= 'single‘ Shortest distance (default) 'complete‘ Furthest distance ……………. Z is an (m-1)-by-3 matrix containing cluster tree information.
Company name
www.themegalleBiblioteka Baiduy.com
作出谱系聚类图 H=dendrogram(Z)
2.5
2
1.5
1
0.5
0
18 26 1 4 16 19 24 22 23 20 21 28 8 9 14 29 30 6 7 10 11 12 13 15 17 2 3 5 25 27
Company name
用 Matlab 实现聚类分析
陈胜利 2010.4.1
www.themegallery.com
谱系聚类法步骤
寻找变量之间的相似性 Y=pdist(X)
定义变量之间的连接 Z=linkage(Y)
作出谱系聚类图 H=dendrogram(Z)
创建聚类
T=cluster(Z,’cutoff’,c)
Company name
只用一个命令也可以搞定
T = clusterdata(X, cutoff) when 0 < cutoff < 2, clusterdata forms clusters when inconsistent values are greater than cutoff .(即代表距离门限) When cutoff is an integer and cutoff >= 2, then clusterdata interprets cutoff as the maximum number of clusters . (即代表所要分的类数)
www.themegallery.com
创建聚类
T=cluster(Z,’cutoff’,c)
T是一个长度是M的矢量,表示每 一个测点所属的类别。 C is a threshold for cutting Z into clusters. 即代表距离门限值。
Company name
www.themegallery.com
www.themegallery.com
寻找变量之间的相似性 Y=pdist(X) X is a matrix of size M by N, treated as M observations of N variables. 每一行代 表一个站点,每一列代表一种参数值。 Y is a distance vector of length (M-1)*M/2-by-1 即假设数据点数长度为10,则Y是一个长度为 45的矢量。
T = clusterdata(X,'param1',val1,...)
Company name