July 2018
Intermediate to advanced
474 pages
13h 37m
English
This section walks through visualizing and calculating the predicted vs. actual stock quotes for Apple in 2017 and 2018.
plt.figure(figsize=(16,6))plt.plot(combined_array[:,0],color='red', label='actual')plt.plot(combined_array[:,1],color='blue', label='predicted')plt.legend(loc = 'lower right')plt.title('2017 Actual vs. Predicted APPL Stock')plt.xlabel('Days')plt.ylabel('Scaled Quotes')plt.show()
import sklearn.metrics as metricsnp.sqrt(metrics.mean_squared_error(ytest,predicted))
Read now
Unlock full access