基于径向基函数 (RBF) 神经网络的麦基格拉斯时间序列预测(Matlab代码实现)

 欢迎来到本博客❤️❤️❤️

博主优势:博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

目录

1 概述

2 运行结果

3 参考文献

4 Matlab代码实现

1 概述

在本文中,实现了一个径向基函数(RBF)神经网络,用于预测混沌时间序列预测。特别是设计了一种麦基格拉斯时间序列预测模型,该模型可以使用过去的时间样本预测前进几步的值。RBF 使用传统的梯度下降学习算法进行训练,核函数是从 K 均值聚类算法获得的中心和扩散的高斯核。

2 运行结果

部分代码:

%%  Results
% Input and output signals (training phase)
figure
plot(indt,f_train,'k','linewidth',lw);
hold on;
plot(indt,y_train,'.:b','linewidth',lw);
xlim([start_of_series_tr+time_steps end_of_series_tr]);
h=legend('Actual Value (Training)','RBF Predicted (Training)','Location','Best');
grid minor
xlabel('Sample #','FontSize',fsize);
ylabel('Magnitude','FontSize',fsize);
set(h,'FontSize',12)
set(gca,'FontSize',13)
saveas(gcf,strcat('Time_SeriesTraining.png'),'png')

% Input and output signals (test phase)
figure
plot(indts,f_test,'k','linewidth',lw);
hold on;
plot(indts,y_test,'.:b','linewidth',lw);
xlim([start_of_series_ts+time_steps end_of_series_ts]);
h=legend('Actual Value (Testing)','RBF Predicted (Testing)','Location','Best');
grid minor
xlabel('Sample #','FontSize',fsize);
ylabel('Magnitude','FontSize',fsize);
set(h,'FontSize',12)
set(gca,'FontSize',13)
saveas(gcf,strcat('Time_SeriesTesting.png'),'png')

% Objective function (MSE) (training phase)
figure
plot(start_of_series_tr:end_of_series_tr-1,10*log10(I(1:end_of_series_tr-start_of_series_tr)),'+-b','linewidth',lw)
h=legend('RBF (Training)','Location','North');
grid minor
xlabel('Sample #','FontSize',fsize);
ylabel('MSE (dB)','FontSize',fsize);
set(h,'FontSize',12)
set(gca,'FontSize',13)
saveas(gcf,strcat('Time_SeriesTrainingMSE.png'),'png')

% Objective function (MSE) (test phase)
figure
plot(start_of_series_ts+time_steps:end_of_series_ts,10*log10(I(end_of_series_tr-start_of_series_tr+1:end)),'.:b','linewidth',lw+1)
h=legend('RBF (Testing)','Location','South');
grid minor
xlabel('Sample #','FontSize',fsize);
ylabel('MSE (dB)','FontSize',fsize);
set(h,'FontSize',12)
set(gca,'FontSize',13)
saveas(gcf,strcat('Time_SeriesTestingMSE.png'),'png')

% Mean square error
10*log10(((f_train'-y_train)*(f_train'-y_train)')/length(y_train))
10*log10(((f_test'-y_test)*(f_test'-y_test)')/length(y_test))

3 参考文献

[1]Shujaat Khan (2022). Mackey Glass Time Series Prediction using Radial Basis Function (RBF) Neural Network.

4 Matlab代码实现

回复:基于径向基函数 (RBF) 神经网络的麦基格拉斯时间序列预测

你可能感兴趣的:(神经网络预测,matlab,算法,人工智能)