sequential inputs in neural network

4 views (last 30 days)
Cool_t
Cool_t on 18 Apr 2011
Hello,
I'm a beginner in neural networks and I cannot write appropriately English… sorry
I’m using signals classification with neural network.
I must train the network with many signals (about 50). Each signal has many sequences of 11 input parameters and 1 output (0 or 1). And the goal is to predict if the signal is dangerous or not.
I prepared the inputs as a cell array, and the output as a vector. The signals are independent, but I have divided the signals into a sequences, which are dependent. I have used this be able to prevent if the signal is dangerous before it ends.
So I have made the input parameters like a cell array, with this form:
P =
{1x9 cell}
{1x8 cell}
{1x7 cell}
{1x9 cell}
{1x11 cell}
{1x9 cell}
{1x8 cell}
{1x12 cell}
{1x9 cell}
{1x9 cell}
{1x7 cell}
{1x15 cell}
And each array is like this form: [11x1 double] [11x1 double] [11x1 double] [11x1 double] [11x1 double] . . .
And the output vector is : T =
0
0
0
1
0
0
1
0
0
0
1
0
I haven’t made T as a sequence because the outputs are independent according to the signals.
So this is my code:
p = P(3:end );
t = T(3:end);
d1 = [1:2];
d2 = [1:2];
narx_net = newnarxsp(p,t,d1,d2,10); %the problem is here
narx_net.trainFcn = 'trainbr';
narx_net.trainParam.show = 10;
narx_net.trainParam.epochs = 600;
Pi = [P(1:2); T(1:2 )];
narx_net = train(narx_net,[p;t],t,Pi );
yp = sim(narx_net,[p;t],Pi);
e = cell2mat(yp)-cell2mat(t );
plot(e)
and I had this error message:
??? Error using ==> cell2mat at 55
Cannot support cell arrays containing cell arrays or objects.
Error in ==> newnarxsp>new_5p1 at 134
if isa(p,'cell'), p = cell2mat(p); end
Error in ==> newnarxsp at 110
net = new_5p1(varargin{:});
Error in ==> apprentissagenarx at 165
narx_net = newnarxsp(p,t,d1,d2,10);
  1. I use the narx function, but I’m not really sure that it is the appropriate function. I wish to know if it is ?
  2. I don’t know if the inputs and outputs should be like this ?
  3. I don’t really know how to use delays appropriately
Error in ==> newnarxsp>new_5p1 at 134
if isa(p,'cell'), p = cell2mat(p); end
Error in ==> newnarxsp at 110
net = new_5p1(varargin{:});
Error in ==> apprentissagenarx at 165
narx_net = newnarxsp(p,t,d1,d2,10);
I hope, I my problem was clear. And I will be grateful if somebody could help me.

Answers (1)

Tomaloka Chowdhury
Tomaloka Chowdhury on 14 Mar 2012
I am having same problem in my program.if you have solved it, can you please provide me your email address.

Community Treasure Hunt

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

Start Hunting!