模糊聚类分析例子1

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

1.模糊聚类分析模型环境区域的污染情况由污染物在4个要素中的含量超标程度来衡量。设这5个环境区域的污染数据为1x=(80,10,6,2),2x=(50,1,6,4),3x=(90,6,4,6),4x=(40,5,7,3),5x=(10,1,2,4).试用模糊传递闭包法对X进行分类。解:由题设知特性指标矩阵为:*80106250164906464057310124X数据规格化:最大规格化'ijijjxxM其中:12max(,,...,)jjjnjMxxx00.8910.860.330.560.10.860.6710.60.5710.440.510.50.110.10.290.67X构造模糊相似矩阵:采用最大最小法来构造模糊相似矩阵55()ijRr,10.540.620.630.240.5410.550.700.530.620.5510.560.370.630.700.5610.380.240.530.370.381R利用平方自合成方法求传递闭包t(R)依次计算248,,RRR,由于84RR,所以4()tRR210.630.620.630.530.6310.560.700.530.620.5610.620.530.630.700.6210.530.530.530.530.531R,410.630.620.630.530.6310.620.700.530.620.6210.620.530.630.700.6210.530.530.530.530.531R=8R选取适当的置信水平值[0,1],按截矩阵进行动态聚类。把()tR中的元素从大到小的顺序编排如下:10.700.63062053.依次取=1,0.70,0.63,062,053,得11000001000()001000001000001tR,此时X被分为5类:{1x},{2x},{3x},{4x},{5x}0.71000001010()001000101000001tR,此时X被分为4类:{1x},{2x,4x},{3x},{5x}0.631101011010()001001101000001tR,此时X被分为3类:{1x,2x,4x},{3x},{5x}0.621111011110()111101111000001tR,此时X被分为2类:{1x,2x,4x,3x},{5x}0.531111111111()111111111111111tR,此时X被分为1类:{12345,,,,xxxxx}Matlab程序如下:%数据规格化MATLAB程序a=[80106250164906464057310124];mu=max(a)fori=1:5forj=1:4r(i,j)=a(i,j)/mu(j);endendr%采用最大最小法构造相似矩阵r=[0.88891.00000.85710.33330.55560.10000.85710.66671.00000.60000.57141.00000.44440.50001.00000.50000.11110.10000.28570.6667];b=r';fori=1:5forj=1:5R(i,j)=sum(min([r(i,:);b(:,j)']))/sum(max([r(i,:);b(:,j)']));endendR%利用平方自合成方法求传递闭包t(R)矩阵合成的MATLAB函数functionrhat=hech(r);n=length(r);fori=1:nforj=1:nrhat(i,j)=max(min([r(i,:);r(:,j)']));endend求模糊等价矩阵和聚类的程序R=[1.00000.54090.62060.62990.24320.54091.00000.54780.69850.53390.62060.54781.00000.55990.36690.62990.69850.55991.00000.38180.24320.53390.36690.38181.0000];R1=hech(R)R2=hech(R1)R3=hech(R2)bh=zeros(5);bh(find(R20.7))=12.模糊综合评判模型某烟草公司对某部门员工进行的年终评定,关于考核的具体操作过程,以对一名员工的考核为例。如下表所示,根据该部门工作人员的工作性质,将18个指标分成工作绩效(1U)、工作态度(2U)、工作能力(3U)和学习成长(4U)这4各子因素集。员工考核指标体系及考核表一级指标二级指标评价优秀良好一般较差差工作绩效工作量0.80.150.500工作效率0.20.60.10.10工作质量0.50.40.100计划性0.10.30.50.050.05工作态度责任感0.30.50.150.050团队精神0.20.20.40.10.1学习态度0.40.40.10.10工作主动性0.10.30.30.20.1360度满意度0.10.20.50.20.1工作能力创新能力0.10.30.50.20自我管理能力0.20.30.30.10.1沟通能力0.20.30.350.150协调能力0.10.30.40.10.1执行能力0.10.40.30.10.1学习成长勤情评价0.30.40.20.10技能提高0.10.40.30.10.1培训参与0.20.30.40.10工作提供0.40.30.20.10请专家设定指标权重,一级指标权重为:0.4,0.3,0.2,0.1A二级指标权重为:10.2,0.3,0.3,0.2A20.3,0.2,0.1,0.2,0.2A30.1,0.2,0.3,0.2,0.2A40.3,0.2,0.2,0.3A对各个子因素集进行一级模糊综合评判得到:1110.39,0.39,0.26,0.04,0.01BAR2220.21,0.37,0.235,0.125,0.06BAR3330.15,0.32,0.355,0.125,0.06BAR4440.27,0.35,0.24,0.1,0.02BAR这样,二级综合评判为:0.390.390.260.040.010.210.370.2350.1250.060.4,0.3,0.2,0.10.150.320.3550.1250.060.270.350.240.10.2BAR0.28,0.37,0.27,0.09,0.04根据最大隶属度原则,认为该员工的评价为良好。同理可对该部门其他员工进行考核。3.层次分析模型你已经去过几家主要的摩托车商店,基本确定将从三种车型中选购一种,你选择的标准主要有:价格、耗油量大小、舒适程度和外观美观情况。经反复思考比较,构造了它们之间的成对比较判断矩阵。A=1378115531113751111853三种车型(记为a,b,c)关于价格、耗油量、舒适程度和外表美观情况的成对比较判断矩阵为价格abc耗油量abc1231/2121/31/21abc11/51/251721/71abc舒适程度abc外表abc1351/3141/51/41abc11/535171/31/71abc根据上述矩阵可以看出四项标准在你心目中的比重是不同的,请按由重到轻顺序将它们排出。解:用matlab求解层次总排序的结果如下表准则价格耗油量舒适程度外表总排序权值准则层权值0.58200.27860.08990.0495方案层单排序权值a0.53960.10560.62670.18840.4091b0.29700.74450.27970.73060.4416c0.16340.14990.09360.08100.1493Matlab程序如下:clc,clearn1=4;n2=3;a=[13781/31551/71/5131/81/51/31];b1=[1231/2121/31/21];b2=[11/51/251721/71];b3=[1351/3141/51/41];b4=[11/535171/31/71];ri=[0,0,0.58,0.90,1.12,1.24,1.32,1.41,1.45];%一致性指标RI[x,y]=eig(a);%x为特征向量,y为特征值lamda=max(diag(y));num=find(diag(y)==lamda);w0=x(:,num)/sum(x(:,num));w0%准则层特征向量CR0=(lamda-n1)/(n1-1)/ri(n1)%准则层一致性比例fori=1:n1[x,y]=eig(eval(char(['b',int2str(i)])));lamda=max(diag(y));num=find(diag(y)==lamda);w1(:,i)=x(:,num)/sum(x(:,num));%方案层的特征向量CR1(i)=(lamda-n2)/(n2-1)/ri(n2);%方案层的一致性比例endw1CR1,ts=w1*w0,CR=CR1*w0%ts为总排序的权值,CR为层次总排序的随机一致性比例%当CR小于0.1时,认为总层次排序结果具有较满意的一致性并接受该结果,否则对判断矩阵适当修改4.灰色预测GM(1,1)模型某地区年平均降雨量数据如表某地区年平均降雨量数据年份122345678降雨量390.6412320559.2380.8542.4553310561年份10911121314151617降雨量300390.6632540406.2313.8576587.6318.5规定hz=320,并认为(0)()xi=hz为旱灾。预测下一次旱灾发生的时间解:初始序列如下(0)x=(390.6,412,320,559.2,380.8,542.4,553,310,561,300,632,540,406.2,313.8,576,587.6,318.5)由于满足(0)()xi=320的(0)()xi为异常值,易得下限灾变数列为0hzx=(320,310,300,313.8,318.5)其对应的时刻数列为t=(3,8,10,14,17)建立GM(1,1)模型(1)对原始数据t做一次累加,即t(1)=(3,11,21,35,52)(2)构造数据矩阵及数据向量(3)计算a,ba=-0.2536,b=6.2585(4)建立模型y=-24.6774+27.6774*exp(.253610*t)(5)模型检验年份原始值模型值残差相对误差级比偏差333.000887.98960.01040.00130.5161101010.2960-0.29600.0296-0.0324141413.26810.73190.05230.0783171717.0983-0.09830.0058-0.0627(6)通过计算可以预测到第六个数据是22.0340由于22.034与17相差5.034,这表明下一次旱灾将发生在五年以后。计算的MATLAB程序如下:clc,cleara=[390.6,412,320,559.2,380.8,542.4,553,310,561,300,632,540,406.2,313.8,576,587.6,318.5]';x0=find(a=320);x0=x0';n=length(x0)lamda=x0(1:n-1)./x0(2:n)range=minmax(lamda)x1=cumsum(x0)fori=2:nz(i)=0.5*(x1(i)+x1(i-1));endB=[-z

1 / 17
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功