Bad accuracy of one step neural network prediction
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi all,
recently I am doing some one step predictions using neural networks, however, the prediction results are really bad (the network itself is trained very well).
The NN I used is a recurrent NN ( narxnet ) with input u(k) and feedback input y(k), and both input and feedback delays are 1. Here my prediction is a little bit different that, for each prediction y_pre(k+1), I just use u(k) and y(k), instead of using some former data series like [u(k-1), u(k-2), ...] and [y(k-1), y(k-2), ...]. In principle, I think it should work because all delays are 1, but the prediction results are really bad. And another weird thing is that, the more steps I predict, the higher accuracy it has. For example, the predicted y_pre(k+10) is much more close to the real y(k+10) compared with the case of y_pre(k+1) and y(k+1).
I am not sure why this happens, but this phenomenon reminds me that, when I use sim function, the first couple of simulation results are really bad if I use a bad initialization, but after some time it will be recovered. I don't know if there is any thing to do with the initialization stuff or if there is something I did wrong. I appreciate it so much if anyone can help me solve the problem.
Thank you very much!
PS: sorry I didn't put my codes here, because actually I think the whole procedure is pretty normal. I skip the configuration and training parts and just put the prediction part here. The codes I used are:
U_k = repmat(u_k,2,1);
Y_k = repmat(y_k,2,1);
input = tonndata(U_k,false,false);
target = tonndata(Y_k,false,false);
[xs,xi,ls,yt] = preparets(netc,input,{},target);
Ys = netc(xs,xi,ls);
ys = cell2mat(Ys);
Here, u_k and y_k are all row vectors, such as
u_k = ones(1,num_in);
y_k = ones(1,num_out);
I expect this ys can be the prediction of y(k+1) based only on u(k) and y(k).
3 Kommentare
Greg Heath
am 29 Nov. 2013
"Some" codes is insufficient. I'm not a mind reader (although I would like to be ... I think).
Antworten (0)
Siehe auch
Kategorien
Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!