Predictandupdatestate and train data in lstm

5 visualizaciones (últimos 30 días)
arash rad
arash rad el 12 de En. de 2023
Respondida: Rajeev el 17 de En. de 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

Respuesta aceptada

Rajeev
Rajeev el 17 de En. de 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)].

Más respuestas (0)

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by