Skip to content

Instantly share code, notes, and snippets.

@erykml
Created December 8, 2020 23:11
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 erykml/50d5aa714dc731260a52bc34ebc2f288 to your computer and use it in GitHub Desktop.
Save erykml/50d5aa714dc731260a52bc34ebc2f288 to your computer and use it in GitHub Desktop.
# prepping the DataFrame
df_test['prophet'] = preds_df_1.iloc[-test_length:].loc[:, 'yhat']
df_test['neural_prophet'] = preds_df_2.iloc[-test_length:].loc[:, 'yhat1']
df_test.set_index('ds', inplace=True)
print('MSE comparison ----')
print(f"Prophet:\t{mean_squared_error(df_test['y'], preds_df_1.iloc[-test_length:]['yhat']):.4f}")
print(f"NeuralProphet:\t{mean_squared_error(df_test['y'], preds_df_2.iloc[-test_length:]['yhat1']):.4f}")
df_test.plot(title='Forecast evaluation');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment