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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File 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!