Predictandupdatestate and train data in lstm

5 次查看(过去 30 天)
Hello everyone
I am new to LSTM when i try to run a code I found some issues that I don't have any answer for it
First when I search in github I found that in codes they define XTrain and YTrain like this:
XTrain = dataTrainStandardized(1:end-1);
YTrain = dataTrainStandardized(2:end);
first question Why they define these parameters like this ? i found this in most codes
and the second question is that in predictAndUpdateState I don't what should we put. in arguement ? someone use train data, some use test data and some use predicted data.
when I have more than 1 input and I want only 1 output I can't use Ypred and I don't know which one is correct to use in my code that make my code more sensible and correct .
thanks in advance

采纳的回答

Rajeev
Rajeev 2023-1-17
The reason for offsetting the dependent and independent variables of the training data is that for the current time step, we want the LSTM to predict the output for the next time step.
The input of the "predictAndUpdateState" function depends on the current state of the network. For more information, you can refer to "Time Series Forecasting Using Deep Learning" section of this guide 04_Deep_Learning_Toolbox_Users_Guide.pdf (ge0mlib.com) [Page 4-8 (Page number 8 of Chapter 4)].

更多回答(0 个)

类别

Help CenterFile 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!

Translated by