Neural Network for time series prediction for specific designed structure

1 view (last 30 days)
Hello all I want to use neural network for time series prediction using specific structure that I have designed. I want to use this structure: p(t)=f(e(t-1),e(t-2),e(t-3),e(t-4),m(t-1),m(t-2)), where "p" is output, "e" is input and "m" is the output of first layer that is feedback to the input (please see the attached image)
I designed this structure using following commands:
inputSeries = tonndata(e,false,false); targetSeries = tonndata(p,false,false); net=feedforwardnet(10); net.layerConnect=[1 0;1 0]; net.layerWeights{1,1}.delays=1:2; net.inputWeights{1}.delays=1:4; % Choose Input and Output Pre/Post-Processing Functions % For a list of all processing functions type: help nnprocess net.inputs{1}.processFcns = {'removeconstantrows','mapminmax'}; net.outputs{2}.processFcns = {'removeconstantrows','mapminmax'};
[inputs,inputStates,layerStates,targets] = preparets(net,inputSeries,targetSeries); % Setup Division of Data for Training, Validation, Testing % For a list of all data division functions type: help nndivide net.divideFcn = 'divideblock'; % Divide data randomly net.divideMode = 'time'; % Divide up every value net.divideParam.trainRatio = 66/100; net.divideParam.valRatio = 10/100; net.divideParam.testRatio = 24/100; net.trainFcn = 'trainlm'; % Levenberg-Marquardt
% Train the Network [net,tr] = train(net,inputs,targets,inputStates,layerStates);
is it correct?
  1 Comment
Greg Heath
Greg Heath on 24 Jan 2015
Which nndataset are we supposed to use to test performance?
help nndatasets
doc ndatasets
Greg
PS Please reformat your code so that it can be cut and pasted into the commandline.

Sign in to comment.

Answers (0)

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!