Get startedGet started for free

Predictor insight graphs

1. Predictor insight graphs

In the previous Chapter, you learned how to explain model performance to business. Besides this, it is also important to check with business and domain experts whether the model is interpretable.

2. Motivation for predictor insight graphs

In a typical predictive modeling project, you proceed as follows when you need to make a predictive model. First, you construct the predictive model. Then, you can evaluate the predictive model using the AUC accuracy metric, and additionally using the cumulative gains and lift curves. One last step that you should carry out to make sure that the model is sound and logical, is to interpret the variables in your model, and verify whether the link between these variables and the target makes sense.

3. Interpretation of predictor insight graphs

To this end, you can use predictor insight graphs. These graphs show the link between the predictive variables and the target that you want to predict. Consider for instance this predictor insight graph that shows the relationship between income and donations. On the horizontal axis, the predictive variable is divided into three groups: donors with low, average and high income. The height of the grey bars indicates how many donors are in each group and is associated with the left hand side vertical axis. The green line indicates the percentage of targets in each group and is associated with the right hand side vertical axis. In this graph, you can see that the higher someone's income is, the more likely he is to donate for a campaign. This interpretation is logical, so it makes sense to keep variables related to income in the model.

4. Predictor insight graphs for continuous variables

The previous example showed the predictor insight graph of a categorical variable. If the variable is continuous, an additional discretization step that divides the continuous variable in bins is needed. This example shows the relationship between the time since someone first donated and the target. The continuous variable days since since first donation is split in five groups of equal size, and then the size of each group and target incidence is plotted for each group. It shows that the longer someone is donor, the more likely he is to donate for the campaign.

5. The predictor insight graph table

The values that are plotted in the predictor insight graph, are collected in a predictor insight graph table. This table has three columns: the categories that are displayed on the horizontal axis, the size of the groups as displayed on the left hand side axis, and the target incidence of each group displayed on the right hand side axis. You can access elements in the predictor insight graph table using indexing.

6. Constructing a predictor insight graph

In the remainder of this Chapter, you will learn how to construct predictor insight graphs. This proceeds in two or three steps. If the variable at hand is continuous, you first need to discretize the variable. Next, you need to calculate the values that are needed to make the plot. These values are gathered in the predictor insight graph table. Finally, the predictor insight graph can be plotted and interpreted.

7. Let's practice!

Now let's have a look at some other examples of predictor insight graphs.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.