Increasing Accuracy of Univariate NARNET Time series
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!