Straight ARIMA forecast result

Dear All I am working on ARIMA forecast model for predicting IT power When I'm doing the forecast it gives me the straight line I'm using ARIMA(5,1,3) and I've added my code below
ITload1=repelem(Results_Cloud(:,6),2); ITload=smooth(Time,ITload1,0.1,'loess'); %Smooth the data with the loess and rloess methods using a span of 10% of the total number of data points. Time=repelem(Results_Cloud(:,1),2); TrainITload=ITload(1:6208); TestITload=ITload(6209:end); TrainTime=Time(1:6208); TestTime=Time(6209:end); ITmDL=arima(5,1,3); %ITmDL=arima('AR',1:5,'ARLags',1:5,'MA',1,'MALags',1:2,'D',1); %ITmDL=arima('AR',{0.5,-0.3},'MA',{0.2,0.5},'D',1,'Constant',0,'Variance',50); [EstimatedITmdl,ParaCov]=estimate(ITmDL,TrainITload,'Display','full'); res = infer(EstimatedITmdl,TrainITload); % for plotting the results figure(); subplot(2,2,1) plot(res./sqrt(EstimatedITmdl.Variance));grid on title('Standardized Residuals') subplot(2,2,2) qqplot(res);grid on subplot(2,2,3) autocorr(res) subplot(2,2,4) parcorr(res) [YcIT,YcMSEit,Uit] = forecast (EstimatedITmdl,length(TestITload),'Y0',TrainITload);%forecasting the future values
figure plot(YcIT) figure plot(Time(1:size(ITload)),ITload) % plot([F;yf]) % hold on % plot(F,'r') hold on plot(TestTime(1:size(TestITload)),TestITload,'m') plot(TestTime(1:size(YcIT)),YcIT,'r'); plot(TestTime(1:size(YcIT)),YcIT+0.99*sqrt(YcMSEit),'r:') plot(TestTime(1:size(YcIT)),YcIT-0.99*sqrt(YcMSEit),'r:') % plot(Dateout,ysim) %show montecarl simulations if desired
% Error calculation error = YcIT - ITload(1:size(YcIT)); errorpct =abs(error)./ITload(1:size(YcIT))*100; MAE = mean(abs(error)); MAPE = mean(errorpct(~isinf(errorpct))); title(['Prediction of IT power- Mean Error ',num2str(MAPE),'%']) xlabel('Time') ylabel('IT power') legend('Historical Demand','Actual Demand','Predicted Demand','95% conf upper','95% conf lower');

1 Comment

https://www.dropbox.com/s/5xyghbaimbawign/ARIMA_IT.m?dl=0

Sign in to comment.

Answers (0)

Categories

Tags

Asked:

on 14 Aug 2017

Commented:

on 14 Aug 2017

Community Treasure Hunt

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

Start Hunting!