When I use NARX neural work to make a prediction for a time series following the example in Matlab Help as follows,
'netp = removedelay(net); view(netp) [Xs,Xi,Ai,Ts] = preparets(netp,X,{},T); y = netp(Xs,Xi,Ai)'
The command of ‘preparets’ is used for prepare the input for the net. But by specifying the input X (external input), T (target), for 'preparets', the value of T should be already known before the prediction acutally conducted. What if the predicted value is unknown and the external input for the next time step is known, how to arrange the data to do the prediction then?
Thanks
Jun

1 comentario

Greg Heath
Greg Heath el 24 de Mayo de 2014
Which MATLAB NARXNET example did you practice on ?
help nndatasets
doc nndatasets
How many hidden layer nodes? How did you initialize the random number generatot?
Greg

Iniciar sesión para comentar.

 Respuesta aceptada

Greg Heath
Greg Heath el 15 de Dic. de 2014

1 voto

You are slightly confused. T is a target used for training. It is not a prediction. It is what you want the output Y to be when X is the input.
The removedelay command plays no part in your question. All it does is reduce all delays by the same amount PROVIDED the resulting input delays remain nonnegative and the resulting feedback delays remain positive.
Otherwise an ERROR should result.
I think what you want to know is what happens if you want to predict the output beyond the time of the last known target value.
Similar to differential equations, what is needed is the extended input and the corresponding initial input and feedback delay states. The initial input and feedback delay states are just the final input and feedback delay states obtained from using the original data.
In particular, from the original data
[ Xs Ts Xi Ai ] = preparets( net, X, {}, T );
[ net tr Ys Es Xf Af ] = train( net, Xs, Ts, Xi, Ai );
where
[ Ys Xf Af ] = net( Xs, Xi, Ai );
To predict beyond this, you need to
1. Close the loop to feedback output instead of feeding back the target ( the target of the extended input is not known).
[ netc Xci Aci ] = closeloop( net, Xi, Ai );
2. Obtain the final input and feedback delay states
[ Xc Tc Xci Aci ] = preparets( netc, X, {}, T );
[ Yc Xcf Acf ] = netc( Xc, Xi, Aci );
3. Apply Xn = Xnew Xni = Xcf, Ani = Acj
[ Yn Xnf Anf ] = netc( Xn, Xni, Ani)
Hope this helps.
Thank you for formally accepting my answers
Greg

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.

Preguntada:

jun
el 5 de Mayo de 2014

Respondida:

el 15 de Dic. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by