LSTM Number of observations in X and Y disagree.

2 ビュー (過去 30 日間)
Gianluca Marchetti
Gianluca Marchetti 2020 年 11 月 2 日
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 Center および File ExchangeSequence 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