Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Plot to visualise
- import matplotlib.pyplot as plt
- def PlotResult(y_train, y_test, y_train_predict, y_test_predict, test_len, name):
- #Visualise
- plt.figure(figsize=(12, 5))
- plt.plot(y_train_predict,color='red')
- plt.plot(range(train_len, train_len+len(y_test)),
- y_test_predict,
- label='Predicted average price',
- color='red',linestyle = '--')
- plt.plot(np.array((y_train).append(y_test)),
- label='Actual average price',
- color='green')
- plt.axvspan(len(y_train), len(y_train)+len(y_test),
- alpha=0.3, color='lightgrey')
- plt.grid(True)
- plt.axis('tight')
- plt.legend(loc="best")
- plt.title('Predicting the mean BTC price with {}'.format(name))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement