天天看點

matlab模糊神經網絡工具箱,模糊神經網絡算法之MATLAB實作.doc

word文檔 可自由複制編輯

使用者名:?? 密碼: HYPERLINK "/%B4%F0%B0%B8%B7%D6%CF%ED%BF%D5%BC%E4/blog/item/c47217d08fe66b23960a16e4.html" \l "#" 登入

HYPERLINK "/reg/new" 注冊

HYPERLINK "/%B4%F0%B0%B8%B7%D6%CF%ED%BF%D5%BC%E4/home" \o "快來下啊的空間 /答案分享空間" 礦業人生~的空間

HYPERLINK "/%B4%F0%B0%B8%B7%D6%CF%ED%BF%D5%BC%E4/home" 首頁 HYPERLINK "/%B4%F0%B0%B8%B7%D6%CF%ED%BF%D5%BC%E4/blog" 部落格 HYPERLINK "/%B4%F0%B0%B8%B7%D6%CF%ED%BF%D5%BC%E4/album" 相冊| HYPERLINK "/%B4%F0%B0%B8%B7%D6%CF%ED%BF%D5%BC%E4/profile" 個人檔案 | HYPERLINK "/%B4%F0%B0%B8%B7%D6%CF%ED%BF%D5%BC%E4/friends" 好友 | HYPERLINK "/i/sys/jump?un=快來下啊&fr=spacebar" \t "_blank" i貼吧

?

檢視文章

?

【轉】 模糊神經網絡算法之MATLAB實作

2011-05-07 12:59

轉載自 HYPERLINK "/share" \t "blank" 分享

最終編輯 HYPERLINK "/whutzxl" \t "blank" whutzxl

function retstr = FnnTrain(dt,ld,tt,sp) retstr=-1; %%%% 輸入參數指派開始 %%%%%%%%%%%%%%%%%%%%%%% % 友善調試程式用,程式調試時去掉這部分的注釋 % dt=4;????? %學習門檻值 % ld=0.05;??? %學習進度 % tt=10;????? %訓練次數 % sp='data\sample.txt';??? %一個點的監測資料 %%%% 輸入參數指派結束 %%%%%%%%%%%%%%%%%%%%%%%% global recordDimention; global sampleNumber; global weightNumber; global distanceThread; global WW; global learningDegree; global epochsNumber; distanceThread=dt; learningDegree=ld; traintimes=tt; A=load(sp); ?? [Arow Acol]=size(A); %樣本個數 sampleNumber=Arow; recordDimention=Acol; disp(sampleNumber); WW=A(1,:); WW=[WW [1]]; weightNumber=1; epochsNumber=1; ?? for jj=2:1:sampleNumber ????? TrainNN2(A(jj,:)); end for jt=1:traintimes-1 ????? for jt2=1:sampleNumber ????????? TrainNN2(A(jj,:)); ????? end end % 将訓練結果寫入權值檔案 dlmwrite('data\w.dat',WW,'\t'); % % 訓練子函數 % function TrainNN2(a) global recordDimention; global sampleNumber; global weightNumber; global distanceThread; global WW; global learningDegree; global epochsNumber; Ldistance=zeros(2,weightNumber); for j1=1:weightNumber ????? Ldistance(2,j1)=j1; end % %%%%%輸入輸出空間的模糊分割 for j2=1:weightNumber ????? Lx=0; ????? for j3=1:recordDimention ????????? Lx=Lx + (a(j3) - WW(j2,j3)) .* (a(j3) - WW(j