Neural Network: fill missing data in time series

2 次查看(过去 30 天)
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);

采纳的回答

Greg Heath
Greg Heath 2016-1-13
Not clear if X2 follows X or it is replacing X
Assuming the latter
[Xo2,Xoi2,Aoi2,To2] = preparets(neto,X2,{},T2);
[Y2,Xf,Af] = netc(Xo2,Xoi2,Aoi2);
ERROR CANNOT USE SUSCRIPTED "O" VARIABLES WITH NETC.
Hope this helps,
Thank you for formally accepting my answer
Greg

更多回答(1 个)

Greg Heath
Greg Heath 2016-1-13
Use netc in the next to last (preparets) statement .
Hope this helps.
Thank you for formally accepting my answer
Greg

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by