univariate time series prediction with neural network

조회 수: 6 (최근 30일)
Marina
Marina 2012년 10월 25일
hi all, I want to use neural network for predicting a univariate time series. I have a series of 1000 points, I want to use a sliding window (the size of my window is 35 points) to predict next 5 points. I am beginner in neural network so I dont know how to choose my inputs and outputs ( since I have to enter each 35 points for a response of 5 points over all my 1000 points I imagine! ). plz could you help me by giving a detailed programm? I looked at time delay neural network, but I dont know how to choose the number of delays and the number of hidden layers.
thanks

채택된 답변

Greg Heath
Greg Heath 2012년 10월 25일
TIMEDELAYNET predicts future outputs from present and past inputs only
NARNET predicts future outputs from past outputs only
NARXNET predicts future outputs from past outputs in addition to present and past inputs.
Choose the delays from the significant values of the input/output crosscorrelation function at NONEGATIVE lags and output autocorrelation function at POSITIVE lags.
Choose the number of hidden nodes, H, by trial and error. The default is H = 10
[x,t] = simplenarx_dataset;
X = zscore(cell2mat(x));
T = zscore(cell2mat(t));
[ I N ] = size(X)
[ O N ] = size(T)
crosscorrXT = nncorr(X,T,N-1);
autocorrT = nncorr(T,T,N-1);
crosscorrXT(1:N-1) = []; % Delete negative delays
autocorrT(1:N-1) = [];
sigthresh95 = 0.21 % Significance threshold
sigcrossind = crosscorrXT( crosscorrXT >= sigthresh95 )
sigautoind = autocorrT( autocorrT >= sigthresh95 )
inputdelays = sigcrossind(sigcrossind <= 35)
feedbackdelays = sigautoind(sigautoind <= 35)
feedbackdelays(1)=[] % Delete zero delay
If your N = 1000 series is relatively stationary (i.e., the local means and variances are relatively constant) you should be able to reduce the window size below 35 (15?).
Hope this helps.
Thank you for formally accepting my answer.
Greg
  댓글 수: 1
Marina
Marina 2012년 10월 29일
Hello Greg and thanks for your answer, I am quite beginner in neural network .. So could you give me plz an example how to code this by NAR not by NARX ( NAR seems more adequate for my problem) And how can I perform mutli step prediction ahead .. I tested stationnarity in my series, and I have find that it is stationnary just in 35 points

댓글을 달려면 로그인하십시오.

추가 답변 (3개)

Greg Heath
Greg Heath 2012년 10월 30일
1. Search the website documentation for sample code and/or demo.
2. Search the command line documentation for sample code.
help narnet
doc narnet
3+4. Search Answers and the Newsgroup using
nar
narnet
5. Try some designs.
6. If you have problems, post the relevant code and complete error messages.
Have fun,
Greg

Marina
Marina 2012년 11월 15일
Hey Greg and thaks again.
Apparently my data are not stationnary so I can't catch the suitable d. form the auctocorrelation function . I made differnation in order to stationnarize them. But how can I make prediction of the initial data from the stationnarized data by neural network
Thank you

Greg Heath
Greg Heath 2012년 11월 16일
If you differenced the original series to reduce nonstationarity, did you check the new series for stationarity? You may have to difference again.
if d(j) = o(j)-o(j-1) then
o(j) = o(j-1) + d(j)
Hope this helps.
Greg

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by