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:

  1. Generating and interpreting the output
  2. Generating the score
  3. 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:

Generating and interpreting the output

Figure 2.26: Code snippet for generating the prediction

Here, prediction is the array in which we have ...

Get Machine Learning Solutions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.