title: how can I get the predict future following(next) value?
body: <pre><code>def create_dataset(signal_data, look_back=1):
      dataX, dataY = [], []
      for i in range(len(signal_data) - look_back):
          dataX.append(signal_data[i:(i + look_back), 0])
          dataY.append(signal_data[i + look_back, 0])
      return np.array(dataX), np.array(dataY)
  
  train_size = int(len(signal_data) * 0.80)
  test_size = len(signal_data) - train_size - int(len(signal_data) * 0.05)
  val_size = len(signal_data) - train_size - test_size
  train = signal_data[0:train_size]
  val = signal_data[train_size:train_size+val_size]
  test = signal_data[train_size+val_size:len(signal_data)]
  
  x_train, y_train = create_dataset(train, look_back)
  x_val, y_val = create_dataset(val, look_back)
  x_test, y_test = create_dataset(test, look_back)
  </code></pre>
  
  <p>I use <code>create_dataset</code> with <code>look_back=20</code>.</p>
  
  <p><code>signal_data</code> is preprocessed with min-max normalisation <code>MinMaxScaler(feature_range=(0, 1))</code>. </p>
  
  <p>Here is my model definition:</p>
  
  <pre><code>model = Sequential()
  model.add(LSTM(64, input_shape=(None, 1), return_sequences=True))
  model.add(Dropout(l))
  
  model.add(LSTM(64))
  model.add(Dropout(l))
  
  model.add(Dense(64))
  model.add(Dropout(l))
  
  model.add(Dense(1))
  </code></pre>
  
  <p><code>x_test</code> shape is <code>(1340, 20, 1)</code> and</p>
  
  <p><code>y_test</code> shape is <code>(1340,)</code></p>
  
  <p>now... how can you get the following(next) value?</p>
  
  <p>I want to get the next value like <code>model.predict</code> or etc...</p>
  
  <p>I have <code>x_test</code> and <code>x_test[-1] == t</code> So, the meaning of the next value is t+1, t+2, .... t+n, in this example I want to get t+1, t+2 ... t+n</p>
  
  <p>if you want to full source(including dataset) then you can see here <a href="https://gist.github.com/Lay4U/e1fc7d036356575f4d0799cdcebed90e" rel="nofollow noreferrer">https://gist.github.com/Lay4U/e1fc7d036356575f4d0799cdcebed90e</a></p>