필터 지우기
필터 지우기

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