heliphix / btc_data

This repository contains the code and datasets for creating the machine learning models in the research paper titled "Time-series forecasting of Bitcoin prices using high-dimensional features: a machine learning approach"
https://doi.org/10.1007/s00521-020-05129-6
MIT License
49 stars 29 forks source link

LSTM model for regression #12

Open marpontik opened 2 years ago

marpontik commented 2 years ago

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 commented 1 year ago

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.