Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSTM model for regression #12

Open
marpontik opened this issue Mar 11, 2022 · 1 comment
Open

LSTM model for regression #12

marpontik opened this issue Mar 11, 2022 · 1 comment

Comments

@marpontik
Copy link

marpontik commented Mar 11, 2022

Hello,
I would like to ask you when you use the LSTM algorithm , do you use timestep=1 in the input shape of LSTM? LSTM models shouldn't have a bigger timestep because of their memory state?
Secondly, for the n-th day prediction, this timestep shouldn't be n? For example when we predict the 7th day, shouldn't we use timestep=7? What is the difference timestep=1 for one day forecast and for 7-th day forecast?

Thanks in advance!

@Leci37
Copy link

Leci37 commented Jan 25, 2023

LSTM is a way of organizing data in time windows,

you can get similar results and more scalable in terms of the model by passing the data to 3d arrays. a 3d array.

Example you can send a df pandas, this function will transform it into a 3d array (with its windows) https://github.com/Leci37/stocks-prediction-Machine-learning-RealTime-telegram/blob/develop/Data_multidimension.py#L122 with it you can work in LSTM, Dense, gru or any, for the ML mechanically it is like working with an image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants