"Pedro" wrote in message <email@example.com>... > Good morning from Spain, > > I'm working with a Elman NN, and I have two problems that I cannot resolve. > > 1. I'm trying to entablish two outputs in the net, but I can't find the code or the option that can do this. I've prove "net.outputs = 2" o "net.numOutputs = 2", but both either work. I thought that, when I configure the net, maybe if I put two targets, this could >change, but I was wrong.
Just change the size of the target from [ 1 N ] to [ 2 N ].
> 2. The output. This takes a long time giving me headache.
N = 5000, H = 10 should take a long time, especially with closeloop delays.
Why not try N = 100 or so for debugging purposes?
Why are you using ELMAN instead of te less complicated NARXNET?
>I don't know why, the output is really really small if we compare it with the target or even >the input. Can it be the weights or the bias? Or maybe the train option?
Do you mean max(abs(cell2mat(Y))) << max(abs(cell2mat(T))) ?
Again, try reducing N to debug.
Also, try your code on a nndataset so we can compare answers.
help nndatasets doc nndatasets
> Input = 1x5000 cell > Target = 1x5000 cell > > The code I use to create the net and to configurate it is the next: > > net = elmannet(1:2,10); > net = configure(net,input,target); > [Xs,Xi,Ai,Ts] = preparets(net,input,target); > > net.divideFcn='divideind'; > [trainInd,valInd,testInd] = divideind(5000,1:3000,3001:4000,4001:5000); > net.divideParam.trainInd = trainInd; > net.divideParam.valInd = valInd; > net.divideParam.testInd = testInd; > > net = trainlm(net,Xs,Ts,Xi,Ai); > Y = net(Xs,Xi,Ai); > perf = perform(net,Ts,Y);