i use the narx network with
inputDelays = 1:4;
feedbackDelays = 1:4;
hiddenLayerSize = neurons;
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize);
and
Yt = net(inputs,inputStates,layerStates);
netp = removedelay(net)
at the end
i have a batch of 10 time samples (1 sample is obtaind at roughlly 1 hour interval) , i interpolate them to have 1000 samples,then i use the narx network to train the 1000 interpolated samples.
now how do i simulated the newlly created network netp? with 1000 samples or with any number of samples, but i need to modifiy de result? if so , how do i do it.
i need to get the next hour forecast from netp
|
|
0
|
|
|
|
Reply
|
clllaaa
|
1/12/2011 2:58:04 PM |
|
or can i use a closeloop on the network to try to predict the 10th step for example ,
how do i predict 10 next values with multistep ?
|
|
0
|
|
|
|
Reply
|
clau
|
1/12/2011 4:24:05 PM
|
|
or i can do a multistep?
the matlab help doesn't help , so how does multistep works ? i need to predict 10 more values (for eg)
"clllaaa geerss" <ravenclau@gmail.com> wrote in message <igkfhs$kpo$1@fred.mathworks.com>...
> i use the narx network with
> inputDelays = 1:4;
> feedbackDelays = 1:4;
> hiddenLayerSize = neurons;
> net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize);
> and
> Yt = net(inputs,inputStates,layerStates);
> netp = removedelay(net)
> at the end
>
> i have a batch of 10 time samples (1 sample is obtaind at roughlly 1 hour interval) , i interpolate them to have 1000 samples,then i use the narx network to train the 1000 interpolated samples.
> now how do i simulated the newlly created network netp? with 1000 samples or with any number of samples, but i need to modifiy de result? if so , how do i do it.
> i need to get the next hour forecast from netp
|
|
0
|
|
|
|
Reply
|
clau
|
1/12/2011 4:27:05 PM
|
|
so the answear to my question - multi step is this :
set initialDelay=multi-step : multi-step+delay
set feedbackDelays =multi-step : multi-step+delay
where :
multi-step = how many timesteps u want to predict
delay = how many past value u want to calculate based on
train network(net)
and removedelay(net) at the end
there u have , multi-step :)
|
|
0
|
|
|
|
Reply
|
clau
|
1/20/2011 12:23:04 PM
|
|
Hi Clau,
Thanks for your information. I encountered the same questions as yours and your post helped solved the problem.
One question: How do you determine the optimuim delays for input and feedback?
Thanks,
Huang
"clau st" <ravenclau@gmail.com> wrote in message <ih99f8$5af$1@fred.mathworks.com>...
> so the answear to my question - multi step is this :
> set initialDelay=multi-step : multi-step+delay
> set feedbackDelays =multi-step : multi-step+delay
> where :
> multi-step = how many timesteps u want to predict
> delay = how many past value u want to calculate based on
> train network(net)
> and removedelay(net) at the end
> there u have , multi-step :)
|
|
0
|
|
|
|
Reply
|
huangyucbr (2)
|
3/20/2012 6:28:18 AM
|
|
"Yu Huang" <huangyucbr@cat.com> wrote in message <jk9822$pip$1@newscl01ah.mathworks.com>...
> Hi Clau,
Hi Huang,
My memory is a bit sketchy from 2011 :), but i think that for the optimum delays you could try
delay=2-5, like in any normal ARX model, or random numbers and see how the network predicts. From what I have learned from then, it all depends on the problem. With smaller delay you have faster training times but bigger errors, with bigger delay expect to have a bigger time in learning the networks , since it needs more computing time to input all the data in 1 epoch and more time to calculate the errors and so on , but you can have a smaller error... Just remember what the delay represents for you, 1 real value or 0.001 like I had from interpolation. There , if I remember correctly, I used delay=100, or you could try some optimisation tehniques, like least square method, or genethic algorithms toolbox(with matlab 2011b, I think) its very easy to do optimisation for a trained network, just use the delay as the gene and the network as your objective function, and standard configuration
=> easy optimisation.
Clau
> Thanks for your information. I encountered the same questions as yours and your post helped solved the problem.
>
> One question: How do you determine the optimuim delays for input and feedback?
>
> Thanks,
>
> Huango
|
|
0
|
|
|
|
Reply
|
ravenclau (1)
|
3/22/2012 4:53:12 PM
|
|
"clau st" <ravenclau@gmail.com> wrote in message <ih99f8$5af$1@fred.mathworks.com>...
> so the answear to my question - multi step is this :
> set initialDelay=multi-step : multi-step+delay
> set feedbackDelays =multi-step : multi-step+delay
> where :
> multi-step = how many timesteps u want to predict
> delay = how many past value u want to calculate based on
> train network(net)
> and removedelay(net) at the end
> there u have , multi-step :)
Hello Clau,
this has been helpful to me too, thanks! So if I want to predict y(t+2), giving y(t),x(t)..y(t-2),x(t-3) eg, i ll put initialDelay=2:5 feedbackDelays=2:5?
I also have an issue with removedelays(net)..what does it actually do? because the only info i have is the performance, which is the same of net train..
|
|
0
|
|
|
|
Reply
|
edobert (2)
|
10/11/2012 1:42:08 AM
|
|
"Yu Huang" <huangyucbr@cat.com> wrote in message <jk9822$pip$1@newscl01ah.mathworks.com>...
> Hi Clau,
>
> Thanks for your information. I encountered the same questions as yours and your post helped solved the problem.
>
> One question: How do you determine the optimuim delays for input and feedback?
Feedback: look for peaks in the target autocorrelafion function
Input: look for peaks in the input/target crosscorrelation function.
help/doc xcorr ( SIGPROC TBX)
help/doc crosscorr (ECON TBX)
help/doc nncorr (NNET TBX)
ZX = zscore(X,1);
ZT = zscore(T,1);
autocorrT = nncorr(ZT,ZT,N-1);
crosscorrXT = nncorr(ZX,ZT,N-1);
crosscorrTX = nncorr(ZT,ZX,N-1);
% CORRECT MATLAB ERROR
crosscorrXT = [ crosscorrTX(1:N-1) crosscorrXT(N:end) ];
crosscorrTX = fliplr(crosscorrXT);
Apparently, a better way to find significant lags is to use PARTIAL autocorrelation and crosscorrelation functions. These sequentially take into account previously considered delays.
Although I've never used them, you can search for references.
I've only read the Wikipedia article.
Hope this helps.
Greg
|
|
0
|
|
|
|
Reply
|
heath (3875)
|
10/12/2012 11:50:08 AM
|
|
|
7 Replies
472 Views
(page loaded in 7.302 seconds)
|