Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Can't get NARNET to produce meaningful result on own dataset

조회 수: 1 (최근 30일)
Thomas Spriestersbach
Thomas Spriestersbach 2018년 11월 7일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi,
following the example for the narnet from the documentation, and predicting 30 more data points I get the following result which shows the last 30 data points from the original dataset the simulated values as well as the predicted values.
When switching to my own dataset (2933 samples) which similarly consists of values between [0.0277 0.9990] and running the same statements as before, the result I get does not fit at all, as shown in the plot below. In particular the predicted values are totally strange.
This is the code:
% X = simplenar_dataset; which = 'simplenar';
X = data; which = 'my';
net = narnet(1:2,10);
net.trainFcn = 'trainlm';
[Xs,Xi,Ai,Ts] = preparets(net,{},{},X);
[net, tr] = train(net,Xs,Ts,Xi,Ai);
[Ysim,Xf,Af] = net(Xs,Xi,Ai);
perf = perform(net,Ts,Ysim)
[netc,Xic,Aic] = closeloop(net,Xf,Af);
Ypred = netc(cell(0,30),Xic,Aic);
figure;
plot(cell2mat(X(end-30+1:end)),'r-o');
hold on
plot(cell2mat(Ysim(end-30+1:end)),'b-');
plot(cell2mat(Ypred),'g-');
title( [which ' dataset'] );
legend( 'real values', 'simulated values', 'predicted values' );
You'll find the data.mat attached to this message.
Any hint on what is going on here is greatly appreciated.
TIA Thomas.

답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by