Created
January 23, 2019 21:47
-
-
Save andrewm4894/fdb8ac2b8e8624e2a13e84b399f0faa1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# now train on new data | |
print(f'... reshaping data for new data training ...') | |
data_train_new = data_reshape_for_model(data_new,N_TIMESTEPS,N_FEATURES) | |
print("... begin training on new data ...") | |
model = train(model,data_train_new,n_epochs=1) | |
yhat_new = predict(model,data_train_new) | |
df_out_new = yhat_to_df_out(data_train_new,yhat_new,N_TIMESTEPS,N_FEATURES) | |
plot_cols = [col for col in df_out_new.columns if 'error_avg' in col] | |
print(plot_cols) | |
# plot the new data | |
fig, ax = plt.subplots(num=None, figsize=(14, 6), dpi=80, facecolor='w', edgecolor='k') | |
size = len(df_out_new) | |
for col in plot_cols: | |
ax.plot(range(0,size), df_out_new[col], '-', linewidth=0.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment