Neural Network: fill missing data in time series
Show older comments
I'm trying to use neural network to fill in missing data values in a time series of methane fluxes. I've used an input series with 6 parameters to train the network with the non-missing flux data. I then want to use the network to find the values of the missing flux data, for which I have input data for the original 6 parameters used to train the network. I'm getting an error message saying the 'Number of inputs does not match net.numInputs' which is confusing because both the original and new input data 6 parameters. Here is the section of code I am using:
% set up the data
x = tonndata(input1,false,false);
x2 = tonndata(input2,false,false);
t = tonndata(target1,false,false);
t2=tonndata(target2,false,false);
% design network
net = narxnet;
[X,Xi,Ai,T] = preparets(net,x,{},t);
net = train(net,X,T,Xi,Ai);
% view(net)
% Simulate network
[Y,Xf,Af] = sim(net,X,Xi,Ai);
% Closed Loop Network
netc = closeloop(net,Xf,Af);
% view(netc)
%setting up the second set of input data
[X2,Xi2,Ai2,T2] = preparets(net,x2,{},t2);
[y2,xf,af] = netc(X2,Xi2,Ai2);
Accepted Answer
More Answers (1)
Greg Heath
on 13 Jan 2016
0 votes
Use netc in the next to last (preparets) statement .
Hope this helps.
Thank you for formally accepting my answer
Greg
Categories
Find more on Deep Learning Toolbox 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!