How can i implement a back-propagation time series prediction using NARX in ANN?

4 visualizaciones (últimos 30 días)
Hi I am beginner in artificial neural network and matlab, I want to predict some step ahead of a coordinate, using previous coordinates in a two-dimensional space. Would you help me?

Respuesta aceptada

Greg Heath
Greg Heath el 13 de Oct. de 2013
For an I-H-O (input-hidden-output) net
[ I N ] = size(input)
[ O N ] = size(target)
Thank you for formally accepting my answer
Greg

Más respuestas (1)

Greg Heath
Greg Heath el 8 de Oct. de 2013
1. Read the help/doc timedelaynnet, narnet and narxnet documentation
2. Duplicate and investigate the examples.
3. Decide which one fits your needs.
4. Apply to your data.
5. If you have problems, post with relevant code and error messages.
Hope this helps.
Greg
PS: If you need more example data:
help nndatasets
Thank you for formally accepting my answer
Greg
  2 comentarios
roudabe
roudabe el 11 de Oct. de 2013
Editada: roudabe el 11 de Oct. de 2013
When I want to use narx (by GUI) for this input() and output() matrix the error is :Inputs and targets have different numbers of samples.Please check the pictures I have produced to make it easy for you.
general input is:[x1 y1;x2 y2;...;x3000 y3000] and data matrix is:[x1 y1 x2 y2 x3 y3 x4 y4; x2 y2 x3 y3 x4 y4 x5 y5;x3 y3 x4 y4 x5 y5 x6 y6; ....;x2997 y2997 x2998 y2998 x2999 y2999 x3000 y3000]
and i want to import 6 first column as input and 2 last column as target to train the network
My data generate like this:
x=linspace(1,20,3000);
%noise
sigma=0.05;
%draw a line(path of obstacles) with noise
y=4*x+1+sigma*randn(size(x)); plot(x,y);
grid on;
data=[x' y']; %(3000*2)
%%%---->
nndata=zeros(2989,12);
for i=1:2989
nndata(i,:)=[data(i+0,1) data(i+0,2) data(i+1,1)...
data(i+1,2) data(i+2,1) data(i+2,2) data(i+3,1) data(i+3,2)];
end
inputs=nndata(:,1:6);
targets=nndata(:,7:8);
Tell me if my way is false to generate data, I want to predict next position of my obstacles which is moving. And I'm not sure about using narxnet or timedelaynet too :( Thanks so much!
Greg Heath
Greg Heath el 30 de Jul. de 2014
See my original answer w.r.t. I/O matrix dimensions.

Iniciar sesión para comentar.

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by