The partial dependence plot (PDP) shows the marginal effect one or two features have on the predicted outcome of a machine learning model.
The algorithm averages the model prediction results over all the samples while the feature of interest, Xs, is kept fixed at some value a. The result is the PDP value for feature Xs at point a. Doing this for all possible values of the feature Xs yields the PDP plot. This gives us a good visualization of how the model changes its prediction, when everything remains the same, except for a single feature that moves along its possible values range. In addition, we show the standard deviation of those averaged prediction at each possible value for Xs.
In the case of a categorical feature, the figure is a bar plot. Each bar represents a category of the feature (y-axis), the bar length represents the marginal effect of this category to the model's prediction (x-axis). For example, the figure on the right shows that people who are married to civilians (the category “Married-civ-spouse”) are more likely to get mortgages approval (prediction > WP) than any of the other categories in this feature.
In the case of a continuous feature, the resulting figure is continuous as well. The marginal effect of feature values on the prediction (y-axis) will be plotted against all possible feature values (x-axis). For example, the figure on the right demonstrates such a plot. We can see that the lower the BMI of an individual is, the more likely he will get a mortgage approval (prediction > WP).
For more information about PDP see: https://christophm.github.io/interpretable-ml-book/pdp.html
Comentarios