Predictandupdatestate and train data in lstm

5 Ansichten (letzte 30 Tage)
arash rad
arash rad am 12 Jan. 2023
Beantwortet: Rajeev am 17 Jan. 2023
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

Akzeptierte Antwort

Rajeev
Rajeev am 17 Jan. 2023
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)].

Weitere Antworten (0)

Kategorien

Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by