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!

请先登录,再进行评论。

类别

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