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 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