I want to forecast for next period

I read source code of nax neural network on http://in.mathworks.com/help/fuzzy/examples/chaotic-time-series-prediction.html?refresh=true but i dntd find forecasting time series for next period exampl for one month or more or less plz can any one help to get the source for forecasting next period or understanding
thank u

Answers (2)

Since you obviously wrote NAX in error, it is not clear whether you meant NAR or NARX. Assuming NAR,
1. Start with the documentation and simple example
help narnet
doc narnet
2. Consider the other NARNET examples
help nndatasets
doc nndatasets
3. Search the NEWGROUP and ANSWERS for relevant posts
NARNET
NARNET tutorial
NARNET greg
NARNET tutorial greg
Hope this helps.
Greg

1 Comment

Greg sir i am relevant your posts first of all i am sorry of typing mistake means NARX
Greg sir i am relevant your posts but iam getting forecasting next period sir i have network data for 3 years from 2005-2010 i want to forecasting 2011 data this is i want plz if u can explain for me this part thank u sir alot

Sign in to comment.

2005 to 2010 is 5 years, not 3.
[ I N ] = size(input)% = ?
[ O N ] = size(target)% = ?
Try divideblock with a (4/6)/(1/6)/(1/6) data division over 6 years.
Sounds straightforward using some of my posted code.
Do not use test data to estimate significant lags, number of hidden nodes, etc.
Hope this helps.
Greg

7 Comments

Thank you very much for your answer Greg sir
and Sir one more help
My data is 1x2551 i have only one attribute
i applied this code for forecasting next 30 days
i want to know this code is corrected and how i can find error by using MAPE NAD MSE
net = narnet(1:4,10);
net.trainParam.showWindow = false;
T = tonndata(T,false,false);
[Xs,Xi,Ai,Ts] = preparets(net,{},{},T);
net = closeloop(train(net,Xs,Ts,Xi,Ai));
Ypred = nan(30,1);
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);
end
Apply your code to one of the NARNET example data sets other than the simplenar-dataset set and I will compare results.
help nndatasets
doc nndatasets
chickenpox_dataset- 498 Monthly chickenpox instances dataset
ice_dataset - 219 Global ice volume dataset
laser_dataset - 10093 Chaotic far-infrared laser dataset
oil_dataset - 180 Monthly oil price dataset.
river_dataset - 264 River flow dataset.
solar_dataset - 2899 Sunspot activity dataset.
Greg
How often are your 2551 measurements ?
Daily: 2551/365.25 ~ 7 years
So you want to use 2521 to predict the last 30?
Greg sir yes
it is 7 years
no i want to forecast 2581 means next 30 days
OK. However, how will you know if the answer is correct?
If you don't, I suggest first doing 2521 + 30. Once that works then you can update the net with the last 30 and then predict 2552 t0 2581.
Have you used the autocorrelation function to find the significant lags?
sir i used autocorrelation function for ARIMA model for determine lags
but, neural network i didnt used autocorrelation function
Bro Greg , i have work as u said 521 + 30. It got good prediction but the problem
How i can upadate the net with last.
And thanking for ur help.

Sign in to comment.

Tags

No tags entered yet.

Asked:

on 15 Jul 2015

Commented:

on 31 Aug 2015

Community Treasure Hunt

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

Start Hunting!