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
Greg Heath
2015년 3월 19일
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);
Greg Heath
2015년 3월 19일
I forgot to mention that the documentation states that ELMANNET is obsolete and recommends NARXNET instead.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!