2

Firstly I am new to Keras. I have the following case:

  1. Time series data with 15 feature held in pandas dataframe
  2. Time series data is hourly. So I want to predict next 16 hourly time series data. I want to give input (16 time series data) , then predict the next 16 hours. I'm thinking of modelling it as many to many, but am not sure.
  3. How many new columns are created in dataframe. , What should the LSTM's input configuration be like, output_shape, etc...

I have searched for it in the following link, but I can't understand the theory and combine multi step and Multi variable

https://machinelearningmastery.com/multi-step-time-series-forecasting-long-short-term-memory-networks-python/

https://machinelearningmastery.com/multivariate-time-series-forecasting-lstms-keras/

Veltzer Doron
  • 934
  • 2
  • 10
  • 31
yunus kula
  • 859
  • 3
  • 10
  • 31

1 Answers1

1

samples, time steps, features = (:, 16, 15)

You make your network predict the next outputs by padding the 16 length time samples with as many padding ticks as you want and thats basically it, it's really a question of preparing your data.

Veltzer Doron
  • 934
  • 2
  • 10
  • 31
  • thanks for your comment, but how to add colunms to dataframe.for examaple how many columns do I add it for training in LSTM model – yunus kula Dec 17 '17 at 14:00
  • If you managed to implement the multi-step example then all you need is to increase the size of the output and shape the data so the fit method works, I usually do it by trial and error. – Veltzer Doron Dec 17 '17 at 14:07
  • Since the shape of the input data is (samples, time_steps, features), a DataFrame cannot hold the data, since it can only store 2D data, isn't it? – rpicatoste Aug 24 '18 at 08:11
  • @VeltzerDoron in the example the network first layer is "LSTM(50, input_shape=(train_X.shape[1], train_X.shape[2]))", aren't we losing the connection of the data from a feature like that? – rpicatoste Aug 24 '18 at 08:12