Testing the baseline model
In this section, we will be implementing our testing approach so that we can evaluate our model's accuracy. We will first generate the output prediction and then we'll start testing it. We will be implementing the following steps here:
Generating and interpreting the output
Generating the score
Visualizing the output
Generating and interpreting the output
To generate the prediction, we are using the treeinterpreter
library. We are predicting the price value for each of our testing dataset records using the following code:
Here, prediction is the array in which we have elements that are the corresponding predicted adj close price for all records of the testing dataset. Now, we will compare this predicted output with the actual adj close price of the testing dataset. By doing this, we will get to know how accurately our first model is predicting the adj close price. In order to evaluate further, we will generate...