I'm trying to do a regression on some inventory amounts with the following model using Keras:

model = Sequential()
model.add(LSTM(100, batch_input_shape=(BATCH_SIZE, TIME_STEPS, 
X_train_timeseries.shape[2]), dropout=0.0, 
           recurrent_dropout=0.0, stateful=True, 
model.add(Dense(20, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
optimizer = optimizers.RMSprop(lr=LEARNING_RATE)
model.compile(loss='mean_squared_error', optimizer=optimizer, metrics=['mae'])

I have a time step of 60, how do I predict past my test data to make actual predictions into the future?


The best answer I found is here

Unfortunately I couldn't get it to work for my solution but reworked my solution and just incremented the sliding window, appended that answer to my test data, and iterated like that.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.