Skip to content

Instantly share code, notes, and snippets.

@khuangaf
Created January 1, 2018 02:54
Show Gist options
  • Save khuangaf/2dcc568b4c8b7a44edaa94ef86bea289 to your computer and use it in GitHub Desktop.
Save khuangaf/2dcc568b4c8b7a44edaa94ef86bea289 to your computer and use it in GitHub Desktop.
predicted = model.predict(validation_datas)
predicted_inverted = []
for i in range(original_datas.shape[1]):
scaler.fit(original_datas[:,i].reshape(-1,1))
predicted_inverted.append(scaler.inverse_transform(predicted[:,:,i]))
print np.array(predicted_inverted).shape
#get only the close data
ground_true = ground_true[:,:,0].reshape(-1)
ground_true_times = ground_true_times.reshape(-1)
ground_true_times = pd.to_datetime(ground_true_times, unit='s')
# since we are appending in the first dimension
predicted_inverted = np.array(predicted_inverted)[0,:,:].reshape(-1)
print np.array(predicted_inverted).shape
validation_output_times = pd.to_datetime(validation_output_times.reshape(-1), unit='s')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment