Neural Network: fill missing data in time series

조회 수: 3 (최근 30일)
Tyler Roman
Tyler Roman 2016년 1월 12일
편집: KSSV 2018년 2월 22일
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