RBF network occurs an error when predicting data
조회 수: 2 (최근 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!