How to predict future values by using Elman recurrent neural network (ERNN) in MATLAB R2012a?

I want to predict future values by 1 step ahead using ERNN. I have a dataset (which I name as 'ba') of size 1x120. But, when I follow the example, it gives me errors. I write as follows:
>> input=ba(1:119); >> target=ba(2:120); >> net=elmannet(1,10); >> [Xs,Xi,Ai,Ts]=preparets (net,input,target); >> net=train(net,Xs,Ts,Xi,Ai);
Error using traingdx (line 108)
Inputs and layer states have different
numbers of samples.
Error in network/train (line 106)
[net,tr] =
feval(net.trainFcn,net,X,T,Xi,Ai,EW,net.trainParam);
And, I also not sure what the 'layerdelays' in "elmannet(layerdelays,hiddenSizes,trainFcn)" means. I just put 1 because I think that I want to predict future values of 1 step ahead.

2 comentarios

Does it work on the simpleseries example in the documentation ?
[X,T] = simpleseries_dataset;
whos
% Name Size Bytes Class
% T 1x100 12000 cell
% X 1x100 12000 cell
input =T(1:99);
target=T(2:100);
net=elmannet(1,10);
[Xs,Xi,Ai,Ts]=preparets (net,input,target);
net=train(net,Xs,Ts,Xi,Ai);
I forgot to mention that the documentation states that ELMANNET is obsolete and recommends NARXNET instead.

Iniciar sesión para comentar.

 Respuesta aceptada

help elmannet
doc elmannet

1 comentario

I have followed the example (program written as above), but I still got the errors. What was going wrong?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 19 de Mzo. de 2015

Comentada:

el 19 de Mzo. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by