Skip to content

Instantly share code, notes, and snippets.

@Vsanku01
Created May 30, 2020 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vsanku01/1c28faa103ef4f0f2ff06a062332acd9 to your computer and use it in GitHub Desktop.
Save Vsanku01/1c28faa103ef4f0f2ff06a062332acd9 to your computer and use it in GitHub Desktop.
forecast batch
forecast = []
first_eval_batch = scaled_train[-length:]
current_batch = first_eval_batch.reshape(1,length,n_features)
for i in range(80):
current_pred = model.predict(current_batch)[0]
forecast.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