Skip to content

Instantly share code, notes, and snippets.

@Vsanku01
Created May 30, 2020 19:20
Show Gist options
  • Save Vsanku01/089523db18df6f428aefbceb91849f79 to your computer and use it in GitHub Desktop.
Save Vsanku01/089523db18df6f428aefbceb91849f79 to your computer and use it in GitHub Desktop.
LSTM Pred
test_predictions = []
first_eval_batch = scaled_train[-length:]
current_batch = first_eval_batch.reshape(1,length,n_features)
for i in range(len(test)):
current_pred = model.predict(current_batch)[0]
test_predictions.append(current_pred)
current_batch = np.append(current_batch[:,1:,:],[[current_pred]],axis = 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment