Multi-dim input in Elman Net

1 view (last 30 days)
Sin
Sin on 10 Oct 2014
Commented: Meet Shah on 13 Mar 2021
Hi~ I used newelm(simple recurrent network) to train the network. But my input data is a 2-d vector on each time-step , not just a single number. So, how to address this problem ? My code seems wrong:
The input has 3 sequences, and each sequence have 5 time-steps. And again each time-step is a 2-d vector. The output is similar.
% code
P = [ [1 1] [2 2] [3 3] [4 4] [5 5];
[2 2] [3 3] [4 4] [5 5] [6 6];
[3 3] [4 4] [5 5] [6 6] [7 7]; ]';
T = [ [2 2] [3 3] [4 4];
[3 3] [4 4] [5 5];
[4 4] [5 5] [6 6]; ]';
th = [0 10; 0 10; 0 10; 0 10; 0 10;];
net = newelm(th, [5, 3], {'tansig', 'purelin'});
view(net);
net.trainParam.epochs = 1000;
net = init(net);
net = train(net, P, T);
y = sim(net, P);
  7 Comments
Sin
Sin on 11 Oct 2014
Edited: Sin on 11 Oct 2014
5 years data or more
Could you teach me how to coding the input matrix P ? Thanks a lot!
Meet Shah
Meet Shah on 13 Mar 2021
Any answers yet?
I am facing a similar problem

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!