国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

基于LMS算法的Mackey Glass時間序列預(yù)測附Matlab代碼

2023-02-04 23:36 作者:Matlab工程師  | 我要投稿

?作者簡介:熱愛科研的Matlab仿真開發(fā)者,修心和技術(shù)同步精進,matlab項目合作可私信。

??個人主頁:Matlab科研工作室

??個人信條:格物致知。


? 內(nèi)容介紹

在自然科學(xué)和社會科學(xué)各領(lǐng)域中,大量決策問題離不開預(yù)測,預(yù)測是決策的基礎(chǔ).時間序列是利用現(xiàn)有的歷史數(shù)據(jù)構(gòu)造模型,進而預(yù)測未來.因此,該文首先介紹了定量化的時間序列預(yù)測目前采用的一種方法與預(yù)測模型,然后在分析時間序列預(yù)測相關(guān)概念的基礎(chǔ)上,研究了其實現(xiàn)方法.

? 部分代碼

%% Mackey Glass Time Series Prediction Using Least Mean Square (LMS)

% Author: SHUJAAT KHAN

clc

clear all

close all


%% Loading Time series data

% I generated a series y(t) for t = 0,1, . . . ,3000, using

% mackey glass series equation with the following configurations:

% b = 0.1, a = 0.2, Tau = 20, and the initial conditions y(t - Tau) = 0.

load Dataset\Data.mat?

time_steps=2;

teacher_forcing=1; % recurrent ARMA modelling with forced desired input after defined time steps?

%% Training and Testing datasets

% For training

Tr=Data(100:2500,1);? ? % Selecting a Interval of series data t = 100~2500

Yr(Tr)=Data(Tr,2);? ? ? % Selecting a chuck of series data y(t)

% For testing

Ts=Data(2500:3000,1);? ?% Selecting a Interval of series data t = 2500~3000

Ys(Ts)=Data(Ts,2);? ? ? % Selecting a chuck of series data y(t)


figure(2)

plot(Tr(2*M:end),Yr(Tr(2*M:end)));? ? ? % Actual values of mackey glass series

hold on

plot(Tr(2*M:end),Yp(Tr(2*M:end))','r')? ?% Predicted values during training

plot(Ts,Ys(Ts),'--b');? ? ? ? % Actual unseen data

plot(Ts(1:end-time_steps+1),Yp(Ts(1:end-time_steps+1))','--r');? % Predicted values of mackey glass series (testing)

xlabel('Time: t');

ylabel('Output: Y(t)');

title('Mackey Glass Time Series Prediction Using Least Mean Square (LMS)')

ylim([min(Ys)-0.5, max(Ys)+0.5])

legend('Training Phase (desired)','Training Phase (predicted)','Test Phase (desired)','Test Phase (predicted)');


mitr=10*log10(mean(E(Tr)));? % Minimum MSE of training

mits=10*log10(mean(E(Ts(1:end-time_steps+1))));? % Minimum MSE of testing


display(sprintf('Total training time is %.5f, \nTotal testing time is %.5f \nMSE value during training %.3f (dB),\nMSE value during testing %.3f (dB)', ...

training_time,testing_time,mitr,mits));

? 運行結(jié)果

編輯

編輯

? 參考文獻

[1]馬飛燕, 李向新. 基于改進麻雀搜索算法-核極限學(xué)習(xí)機耦合算法的滑坡位移預(yù)測模型[J]. 科學(xué)技術(shù)與工程, 2022(022-005).

? 完整代碼

??部分理論引用網(wǎng)絡(luò)文獻,若有侵權(quán)聯(lián)系博主刪除

?? 關(guān)注我領(lǐng)取海量matlab電子書和數(shù)學(xué)建模資料


基于LMS算法的Mackey Glass時間序列預(yù)測附Matlab代碼的評論 (共 條)

分享到微博請遵守國家法律
绥德县| 格尔木市| 察雅县| 晋江市| 密云县| 扎兰屯市| 尼勒克县| 西林县| 昆明市| 凌海市| 新宾| 柘荣县| 盐源县| 清水河县| 石门县| 色达县| 天柱县| 雷州市| 化德县| 灌南县| 镇巴县| 东乌| 克拉玛依市| 富裕县| 柞水县| 崇明县| 富川| 阳朔县| 安塞县| 宁南县| 平舆县| 平邑县| 蚌埠市| 淄博市| 炉霍县| 天峻县| 都匀市| 哈巴河县| 景德镇市| 建宁县| 望江县|