模糊數(shù)學(xué)聚類分析-matlab作聚類分析圖_第1頁(yè)
模糊數(shù)學(xué)聚類分析-matlab作聚類分析圖_第2頁(yè)
模糊數(shù)學(xué)聚類分析-matlab作聚類分析圖_第3頁(yè)
模糊數(shù)學(xué)聚類分析-matlab作聚類分析圖_第4頁(yè)
模糊數(shù)學(xué)聚類分析-matlab作聚類分析圖_第5頁(yè)
已閱讀5頁(yè),還剩15頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

實(shí)驗(yàn)一:聚類分析要求:把照片分類一例(即例3),編程序做一遍。

照片分類。現(xiàn)有三個(gè)家庭,每個(gè)家庭由四至七人組成,每人一張照片,共有十六張。通過(guò)照片按相貌相像程度分類,把三個(gè)家庭區(qū)分開(kāi)來(lái)。首先,建立相似關(guān)系。任取兩張照片,請(qǐng)若干中學(xué)生按相貌相像程度打分,取平均數(shù)再折合成隸屬度,得到相像關(guān)系的F矩陣R(見(jiàn)表)由于矩陣是對(duì)稱的,只寫(xiě)出下三角。101001000.4100.80010.500.20.20100.8000.4010.40.20.20.500.80100.400.80.40.20.401000.20.2000.200.2100.50.20.2000.800.40.21000.20.800000.40.8010.800.20.400.400.40000100.800.20.400.800.20.20.6001000.40.800.2000.2000.20.2010.6000.20.20.800.400000.40.20.41表1模糊矩陣A=[100000.500.400000.8000.6;

01000.800.80.20.400.5000.800;

0010.400.200.200.20.20.20.200.40;

000.4100.200.50.80.20.20.80.40.20.80.2;

00.800100.400.400000.400.2;

0.500.20.20100.80.20000.400.20.8;

00.8000.40100.40.20.8000.800;

0.40.20.20.500.80100000.4000.4;

00.400.80.40.20.4010.20.40.400.20.20;

000.20.2000.200.210.20.800.200;

00.50.20.2000.800.40.21000.600;

000.20.800000.40.801000.20;

0.800.20.400.400.40000100.20.4;

00.800.20.400.800.20.20.600100.2;

000.40.800.2000.2000.20.2010.4;

0.6000.20.20.800.400000.40.20.41]模糊矩陣合成令B=A,等于題目中給出的模糊矩陣,做模糊矩陣的合成運(yùn)算。Matlab程序編寫(xiě)如下:M-文件見(jiàn)Max-Min(隨文件夾)模糊矩陣合成運(yùn)算程序function[C]=Max_Min(A,B)A=[];B=[];if(s1~=s)return;end[m,s]=size(A);[s1,n]=size(B);C=[];for(i=1:m)for(j=1:n)C(i,j)=0;for(k=1:s)x=0;if(A(i,k)<B(k,j))x=A(i,k);elsex=B(k,j);endif(C(i,j)<x)C(i,j)=x;endendend;end建立M文件如下:ans=Columns1through101.00000.20000.20000.40000.20000.600000.50000.200000.20001.00000.20000.40000.80000.20000.80000.20000.40000.20000.20000.20001.00000.400000.20000.20000.40000.40000.20000.40000.40000.40001.00000.40000.50000.40000.50000.80000.80000.20000.800000.40001.00000.20000.80000.20000.40000.20000.60000.20000.20000.50000.20001.00000.20000.80000.20000.200000.80000.20000.40000.80000.20001.00000.20000.40000.20000.50000.20000.40000.50000.20000.80000.20001.00000.50000.20000.20000.40000.40000.80000.40000.20000.40000.50001.00000.400000.20000.20000.80000.20000.20000.20000.20000.40001.000000.80000.20000.40000.50000.20000.80000.20000.40000.200000.40000.40000.80000.40000.20000.40000.50000.80000.80000.80000.20000.40000.40000.20000.500000.40000.40000.20000.20000.80000.20000.20000.80000.20000.80000.20000.40000.20000.40000.20000.40000.80000.20000.40000.20000.50000.80000.20000.60000.20000.40000.40000.20000.80000.20000.80000.20000.2000Columns11through16000.80000.20000.40000.60000.80000.40000.20000.80000.20000.20000.20000.40000.40000.20000.40000.40000.40000.80000.40000.20000.80000.40000.50000.40000.20000.80000.20000.20000.20000.20000.50000.20000.40000.80000.80000.400000.80000.20000.20000.20000.50000.40000.20000.50000.80000.40000.80000.40000.40000.80000.20000.20000.80000.20000.20000.20000.20001.00000.40000.20000.80000.20000.20000.40001.00000.40000.20000.80000.20000.20000.40001.00000.20000.40000.60000.80000.20000.20001.00000.20000.20000.20000.80000.40000.20001.00000.40000.20000.20000.60000.20000.40001.0000在Matlab中輸入如下命令:>>Max_Min將第一次矩陣合成運(yùn)算的矩陣記為C對(duì)比:模糊矩陣C不等于A,故該矩陣不是傳遞閉包。進(jìn)行第二次合成運(yùn)算:第一次做模糊矩陣合成運(yùn)算的矩陣C,令D=C,編寫(xiě)如下程序:(見(jiàn)M文件Max_Min2.m(隨文件夾))運(yùn)行結(jié)果如下:E=1.00.40.40.50.40.60.40.60.50.40.40.50.80.20.50.60.41.00.40.40.80.40.80.40.40.40.80.40.40.80.40.40.40.41.00.40.40.40.40.40.40.40.40.40.40.40.40.40.50.40.41.00.40.50.40.50.80.80.40.80.50.40.80.50.40.80.40.41.00.40.80.40.40.40.80.40.40.80.40.40.60.40.40.50.41.00.40.80.50.50.40.50.60.20.50.80.40.80.40.40.80.41.00.40.40.40.80.40.40.80.40.40.60.40.40.50.40.80.41.00.50.50.40.50.60.40.50.80.50.40.40.80.40.50.40.51.00.80.40.80.40.40.80.50.40.40.40.80.40.50.40.50.81.00.40.80.40.40.80.40.40.80.40.40.80.40.80.40.40.41.00.40.40.80.40.40.50.40.40.80.40.50.40.50.80.80.41.00.40.40.80.50.80.40.40.50.40.60.40.60.40.40.40.41.00.40.40.60.20.80.40.40.80.20.80.40.40.40.80.40.41.00.40.20.50.40.40.80.40.50.40.50.80.80.40.80.40.41.00.50.60.40.40.50.40.80.40.80.50.40.40.50.60.20.51.0經(jīng)對(duì)比,模糊矩陣E不等于矩陣C,不是傳遞閉包。進(jìn)行第三次矩陣合成運(yùn)算,具體程序見(jiàn)M文件Max_Min3.m(隨文件夾)經(jīng)Matlab實(shí)現(xiàn)如下:>>Max_Min3ans=Columns1through81.00000.40000.40000.50000.40000.60000.40000.60000.40001.00000.40000.40000.80000.40000.80000.40000.40000.40001.00000.40000.40000.40000.40000.40000.50000.40000.40001.00000.40000.50000.40000.50000.40000.80000.40000.40001.00000.40000.80000.40000.60000.40000.40000.50000.40001.00000.40000.80000.40000.80000.40000.40000.80000.40001.00000.40000.60000.40000.40000.50000.40000.80000.40001.00000.50000.40000.40000.80000.40000.50000.40000.50000.50000.40000.40000.80000.40000.50000.40000.50000.40000.80000.40000.40000.80000.40000.80000.40000.50000.40000.40000.80000.40000.50000.40000.50000.80000.40000.40000.50000.40000.60000.40000.60000.40000.80000.40000.40000.80000.40000.80000.40000.50000.40000.40000.80000.40000.50000.40000.50000.60000.40000.40000.50000.40000.80000.40000.8000Columns9through160.50000.50000.40000.50000.80000.40000.50000.60000.40000.40000.80000.40000.40000.80000.40000.40000.40000.40000.40000.40000.40000.40000.40000.40000.80000.80000.40000.80000.50000.40000.80000.50000.40000.40000.80000.40000.40000.80000.40000.40000.50000.50000.40000.50000.60000.40000.50000.80000.40000.40000.80000.40000.40000.80000.40000.40000.50000.50000.40000.50000.60000.40000.50000.80001.00000.80000.40000.80000.50000.40000.80000.50000.80001.00000.40000.80000.50000.40000.80000.50000.40000.40001.00000.40000.40000.80000.40000.40000.80000.80000.40001.00000.50000.40000.80000.50000.50000.50000.40000.50001.00000.40000.50000.60000.40000.40000.80000.40000.40001.00000.40000.40000.80000.80000.40000.80000.50000.40001.00000.50000.50000.50000.40000.50000.60000.40000.50001.0000記此矩陣為F,F不等于E,故F不是傳遞閉包,進(jìn)行第四次矩陣合成運(yùn)算:具體程序見(jiàn)M文件Max_Min4.m(隨文件夾)Matlab實(shí)現(xiàn)結(jié)果如下:記第四次矩陣合成運(yùn)算的結(jié)果為G>>Max_Min4ans=Columns1through81.00000.40000.40000.50000.40000.60000.40000.60000.40001.00000.40000.40000.80000.40000.80000.40000.40000.40001.00000.40000.40000.40000.40000.40000.50000.40000.40001.00000.40000.50000.40000.50000.40000.80000.40000.40001.00000.40000.80000.40000.60000.40000.40000.50000.40001.00000.40000.80000.40000.80000.40000.40000.80000.40001.00000.40000.60000.40000.40000.50000.40000.80000.40001.00000.50000.40000.40000.80000.40000.50000.40000.50000.50000.40000.40000.80000.40000.50000.40000.50000.40000.80000.40000.40000.80000.40000.80000.40000.50000.40000.40000.80000.40000.50000.40000.50000.80000.40000.40000.50000.40000.60000.40000.60000.40000.80000.40000.40000.80000.40000.80000.40000.50000.40000.40000.80000.40000.50000.40000.50000.60000.40000.40000.50000.40000.80000.40000.8000Columns9through160.50000.50000.40000.50000.80000.40000.50000.60000.40000.40000.80000.40000.40000.80000.40000.40000.40000.40000.40000.40000.40000.40000.40000.40000.80000.80000.40000.80000.50000.40000.80000.50000.40000.40000.80000.40000.40000.80000.40000.40000.50000.50000.40000.50000.60000.40000.50000.80000.40000.40000.80000.40000.40000.80000.40000.40000.50000.50000.40000.50000.60000.40000.50000.80001.00000.80000.40000.80000.50000.40000.80000.50000.80001.00000.40000.80000.50000.40000.80000.50000.40000.40001.00000.40000.40000.80000.40000.40000.80000.80000.40001.00000.50000.40000.80000.50000.50000.50000.40000.50001.00000.40000.50000.60000.40000.40000.80000.40000.40001.00000.40000.40000.80000.80000.40000.80000.50000.40001.00000.50000.50000.50000.40000.50000.60000.40000.50001.0000矩陣合成運(yùn)算求得傳遞閉包對(duì)比矩陣F,可知G=F,則矩陣F為模糊矩陣A的傳遞閉包。傳遞閉包由以上分析的模糊矩陣A的傳遞閉包為t(A)=[1.00.40.40.50.40.60.40.60.50.50.40.50.80.40.50.60.41.00.40.40.80.40.80.40.40.40.80.40.40.80.40.40.40.41.00.40.40.40.40.40.40.40.40.40.40.40.40.40.50.40.41.00.40.50.40.50.80.80.40.80.50.40.80.50.40.80.40.41.00.40.80.40.40.40.80.40.40.80.40.40.60.40.40.50.41.00.40.80.50.50.40.50.60.40.50.80.40.80.40.40.80.41.00.40.40.40.80.40.40.80.40.40.60.40.40.50.40.80.41.00.50.50.40.50.60.40.50.80.50.40.40.80.40.50.40.51.00.80.40.80.50.40.80.50.50.40.40.80.40.50.40.50.81.00.40.80.50.40.80.50.40.80.40.40.80.40.80.40.40.41.00.40.40.80.40.40.50.40.40.80.40.50.40.50.80.80.41.00.50.400.80.50.80.40.40.50.40.60.40.60.50.50.40.51.00.40.50.60.40.80.40.40.80.40.80.40.40.40.80.40.41.00.40.40.50.40.40.80.40.50.40.50.80.80.40.80.50.41.00.50.60.40.40.50.40.80.40.80.50.50.40.50.60.40.51.0]聚類分析建立M文件,如下M文件juleifenxi.m(隨文件夾)(這里分類取為4)gj=[1.00.40.40.50.40.60.40.60.50.50.40.50.80.40.50.60.41.00.40.40.80.40.80.40.40.40.80.40.40.8

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論