Azzera filtri
Azzera filtri

Neural Network: fill missing data in time series

2 visualizzazioni (ultimi 30 giorni)
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);

Risposta accettata

Greg Heath
Greg Heath il 13 Gen 2016
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

Più risposte (1)

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

Categorie

Scopri di più su Sequence and Numeric Feature Data Workflows in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by