Increasing Accuracy of Univariate NARNET Time series

조회 수: 1 (최근 30일)
Adedeji
Adedeji 2018년 2월 14일
Please I ran this code for a univariate prediction but the seasonality in my result has a wide gap between the actual and predicted. What can I do to improve the accuracy. Love to hear from you.
clear;clc;
Xall= xlsread('APB.xlsx','Autumn','b2:b277');
Y=Xall(1:256,1);
% X=cell2mat(X);
Xtest= Xall(257:276,1);
% T = tonndata(X,false,false);
net = narnet(1:3,25); % creates the autoregressive NN
net.trainParam.showWindow = true; % shows the training window
T = tonndata(Y,false,false); % converts the data to a ANN cell array form.
[Xs,Xi,Ai,Ts] = preparets(net,{},{},T); %
net = closeloop(train(net,Xs,Ts,Xi,Ai));
Ypred = nan(23,1);
% tre=Ypred;
Ypred = tonndata(Ypred,false,false);
Ypred(1:4) = T(end-3:end);
[xc,xic,aic,tc] = preparets(net,{},{},Ypred);
Ypred = fromnndata(net(xc,xic,aic),true,false,false);
save('netAPB_Autumn')
% Performance= perform(net,tc,Ypred)
xlswrite('APB Predicted Result.xlsx', Ypred, 'a2:a20')
xd=1:1:20;
figure, plot(xd,Ypred,'--*', xd,Xtest, '-.o')
xlabel('Days')
ylabel('Prediction')
legend('Predicted', 'Actual')

답변 (0개)

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by