Predictandupdatestate and train data in lstm

3 ビュー (過去 30 日間)
arash rad
arash rad 2023 年 1 月 12 日
回答済み: Rajeev 2023 年 1 月 17 日
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 Center および File ExchangeSequence 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