RBF network occurs an error when predicting data
3 ビュー (過去 30 日間)
古いコメントを表示
When I tried to use the RBF network model to predict a very simple function, the input X can't exceed the training range or the output Y will become a constant. It means that the RBF network can't used to predict new datas, which is not correct.
My MATLAB is 2020b and academic licence.
AryX = 0:1000;
AryY = sin(AryX/100);
% train
MainNet = newrbe(AryX(1:500),AryY(1:500));
% predict
AryPred = MainNet(AryX);%sim(MainNet,AryX);
% calculate error
AryErr = AryPred - AryY;
% drawing
plot(AryX,AryY,'r-');
hold on
plot(AryX,AryPred,'b--');
hold off

0 件のコメント
回答 (1 件)
Rijuta
2023 年 2 月 23 日
Hi,
I understand that you are training an RBF network using only the first 500 samples of the sine function, and then testing the network on the entire range of 0 to 1000. Due to this, the network performs poorly for inputs that are outside the training range giving a constant output.
It is advised to split your sample, increase the size of your training set, and use only the remaining samples for testing. For example, the first 800 samples can be used to train the network and then testing can be done on the remaining 200. Alternatively, you can also train the RBF network using a larger range of inputs, and then use it to predict the sine function values for the range of 0 to 1000.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
