Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: help me. NaR not working
Posted:
Oct 10, 2013 1:14 PM


"Jame " <phuongr3k2@gmail.com> wrote in message <l31lg3$ak9$1@newscl01ah.mathworks.com>... > "Greg Heath" <heath@alumni.brown.edu> wrote in message <l3156r$6fh$1@newscl01ah.mathworks.com>... > > "phuong" wrote in message <l30p0q$bh5$1@newscl01ah.mathworks.com>... > > . > > > Thank for your help. But please talk me more detail. I really do not understand much of your comment. > > > 1. I just set ratio for training, validate and test. > > > > No. You did more than that. You defined inputseries and inputseriesval. > > DON'T. Just define indices(divideind ) or ratios(divideblock) and the program will take care of the rest. > I think you don't know my need. First i just use 1step ahead prediction to predict y(t+1) from y(t),y(t1),...y(td). > And i want to test out of sample. Inputseriesval is the set of new input. From inputsereies( have dimension 1x1300), i will predict the value of 1301 by 1tep ahead. And with new input from inputseriseval, here is inputseriseval(1)  it is the target of 1301, I want to predict the target of 1302. Then with new input is inputseriseval(2), i want to predict the next value, target of 1303. And to be continue to end the value of inputseries. Here just is the out of sample of 1step ahed prediction when i have a new input, new input later,so so. > > > > > > > >In here, I don't want to use test set. > > > > MSEtst is the only UNBIASED performance estimate. MSEtrn and MSEval are BIASED > > > > >Because I will apply the network to specify data. > > > > specific? Then just put that data in test. It will not be used for design. > > > I know that MSEtrn different with MSEval. MSEval use for stopping training, it represent generalize ability of network. MSEtr use for adjust weight, make network catch the signal. MSEtst use for performance of network on specific data set(test set). > My knowledge about MSE on three sets is right? If it right, so like I said above , I want to apply network on my specify test set( here is 'inputseriesval'). So I don't need to have network test like default, just train and validation. With my test set, I will compute MSE again after I have all predict values. > > > 2. I just want to 1step prediction. > > > > That means FD = 1: > > FD = 1, H = 10 > > net = narnet(FD,H) > > ... > > netc = closeloop(net) > > > > If that is not what you mean, explain in more detail. > > > > Also why do you think there is a difference between lag and delay? > > > Like above, I just want use 2step ahead. So i think I don't need close loop. > > > >It means with trained weight, I want to recalculate with new pattern. The system will give me the output for new pattern with the trained weight. I think It different with multistep ahead prediction. > > > > The net must have a buffer of feedback delays to operate properly. That is what preparets is for. > > > > >And here with the linear data set, i think it will right. > > > > I don't know what that means. > > > > > 3. I agree with you , It is effected by random intialization weight. But if the sytem is stable, I think it just converge to one result. > > > > NO. NO. NO. > > > > If the system is simple (H = []) MOST of the results will be the same. Otherwise NOT!Think of a mountain range. If you start out on one side of a mountain, training causes you to try to go down and stops when you start to go up. However, that local min may be higher than other local mins in the range. > > > > And following your comment, I inserted command 'rng(0) ' before trainning and if the system not fit, it alway not fit and reverse. > > > > No. if you design multiple nets in a loop, the weights will all be different. If you choose the one with the lowest MSEval, you can redesign that if you know rng(0). > > > > I have posted hundreds of multiple loop designs. Search on > > > > neural greg Ntrials > > > > > Please help me agian and show me more detail. > > > > > I really need more helps. > > > > Again, I have posted hundreds of examples in NEWSGROUP and ANSWERS > > > > .Use your search engine. > > > > Greg > Sorry if I do not know correctly your idea. Following your commen, i think you said that we must use 'rng' function for loop network.
You misunderstood the use of the word "loop" :
If you ever want to repeat the design of a net, you have to know either 1. The initial weights and trn/val/tst data division or 2. The initial state of the RNG
Therefore, if you are designing multiple nets in a loop in order to minimize the number of hidden nodes and/or find the best weight configuration, you should initialize the RNG at the beginning of the loop so that you only have to redesign the chosen net.
Otherwise, you can save the current best net as you go through the loop.
>But like above I just want to predic with 1step ahead. So why i must use closeloop.
An openloop feedback configuration is not operational. Where would you get the feedback signal?
Hope this helps.
Greg



