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

조회 수: 4 (최근 30일)
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?

채택된 답변

Greg Heath
Greg Heath 2013년 10월 13일
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

추가 답변 (1개)

Greg Heath
Greg Heath 2013년 10월 8일
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
roudabe
roudabe 2013년 10월 11일
편집: roudabe 2013년 10월 11일
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 2014년 7월 30일
See my original answer w.r.t. I/O matrix dimensions.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by