日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

模糊神经网络2--基于ANFIS的混沌时间序列预测

發布時間:2024/3/12 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 模糊神经网络2--基于ANFIS的混沌时间序列预测 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

預測序列模型方程:

該預測模型常用于神經網絡的訓練:

1. 輸入輸出數據及處理

load mgdata.dat time = mgdata(:,1); x = mgdata(:, 2); figure(1) plot(time,x) title('Mackey-Glass Chaotic Time Series') xlabel('Time (sec)') ylabel('x(t)')

%輸入輸出數據處理 for t = 118:1117 Data(t-117,:) = [x(t-18) x(t-12) x(t-6) x(t) x(t+6)]; end trnData = Data(1:500,:); chkData = Data(501:end,:);

2. genfis生成初始系統

% 生成初始Sugeno FIS系統 fis = genfis(trnData(:,1:end-1),trnData(:,end),genfisOptions('GridPartition')); % genfis 默認每個輸入輸出量為 2 個generalized bell membership functions 隸屬函數,均勻分布 figure subplot(2,2,1) plotmf(fis,'input',1) subplot(2,2,2) plotmf(fis,'input',2) subplot(2,2,3) plotmf(fis,'input',3) subplot(2,2,4) plotmf(fis,'input',4)

%**上述生成的初始系統應對16 條規則;
%**4輸入1輸出
%**待估計參數為104個
%**訓練數據為500個?

3. ANFIS系統配置及訓練

% ANFIS訓練 options = anfisOptions('InitialFIS',fis,'ValidationData',chkData); [fis1,error1,ss,fis2,error2] = anfis(trnData,options); %**fis1最佳擬合結構;fis2最佳預測結構

訓練后系統隸屬函數:

% 訓練后隸屬函數 figure subplot(2,2,1) plotmf(fis2,'input',1) subplot(2,2,2) plotmf(fis2,'input',2) subplot(2,2,3) plotmf(fis2,'input',3) subplot(2,2,4) plotmf(fis2,'input',4)

4. 訓練效果及擬合誤差

% 訓練及預測誤差曲線 figure plot([error1 error2]) hold on plot([error1 error2],'o') legend('Training error','Checking error') xlabel('Epochs') ylabel('Root Mean Squared Error') title('Error Curves')% ANFIS系統擬合效果 anfis_output = evalfis(fis2,[trnData(:,1:4); chkData(:,1:4)]); figure index = 125:1124; plot(time(index),[x(index) anfis_output]) xlabel('Time (sec)') title('MG Time Series and ANFIS Prediction') % 預測誤差 diff = x(index) - anfis_output; plot(time(index),diff) xlabel('Time (sec)') title('Prediction Errors')

總結

以上是生活随笔為你收集整理的模糊神经网络2--基于ANFIS的混沌时间序列预测的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。