LSTM Number of observations in X and Y disagree.

2 次查看(过去 30 天)
Hi, I have this problem: I have a time serie data composed by 10 features x 1934 observations.
I need to predict one step ahead the features from 5 to 10 only, so I used time series sxample and I changed the number of input and output feature, but Matlab give me the error "Number of observations in X and Y disagree." This is the core of program:
numFeatures = 10;
numResponses = 6;
options = trainingOptions('adam', ...
'MaxEpochs', 1000, ...
'GradientThreshold',1, ...
'InitialLearnRate',0.005, ...
'LearnRateSchedule','piecewise', ...
'LearnRateDropPeriod',125, ...
'LearnRateDropFactor',0.2, ...
'MiniBatchSize', 128, ...
'Verbose',0, ...
'ValidationData',dataValidation, ...
'ValidationFrequency', vf, ...
'ValidationPatience', 3);
layers = [ ...
featureInputLayer(numFeatures)
lstmLayer(100)
fullyConnectedLayer(numResponses)
regressionLayer];
net = trainNetwork(XTrainStd,YTrainStd,layers,options);
Where size(XTrainStd) = 10 x 1933 and size(YTrainStd) = 6 x 1933 and YTrainStd is one step ahead (before the standardizzation Y=X(5:10, 2:end), X=(:, 1:end-1) ).
How can I fix the error?

回答(0 个)

类别

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

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by