LSTM Number of observations in X and Y disagree.

1 vue (au cours des 30 derniers jours)
Gianluca Marchetti
Gianluca Marchetti le 2 Nov 2020
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?

Réponses (0)

Catégories

En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by