April 2019
Intermediate to advanced
426 pages
11h 13m
English
Let's plot the predicted and actual values onto a graph to visualize the performance of our deep learning model. Run the following codes to extract our values of interest:
In [ ]: predictions = predicted_values[:, -1][::-1] actual = df_close['2018']['adj_close_price'].values[::-1]
The rescaled predicted_values dataset is a NumPy ndarray object with predicted values on the last column. These values and the actual adjusted closing prices of 2018 are extracted to the predictions and actual variables respectively. Since the format of the original dataset is in descending order of time, we reverse them in ascending order for plotting on a graph. Run the following codes to generate a graph:
In [ ]: %matplotlib ...
Read now
Unlock full access