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

1 Ansicht (letzte 30 Tage)
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?

Akzeptierte Antwort

Greg Heath
Greg Heath am 13 Okt. 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

Weitere Antworten (1)

Greg Heath
Greg Heath am 8 Okt. 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 Kommentare
roudabe
roudabe am 11 Okt. 2013
Bearbeitet: roudabe am 11 Okt. 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 am 30 Jul. 2014
See my original answer w.r.t. I/O matrix dimensions.

Melden Sie sich an, um zu kommentieren.

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!

Translated by