Two Visualization techniques for Models
-
Partial Dependence Plots PDP’s help explain relation of individual features vs. model
-
Shapley Value Plots SHAP plots help explain individual predictions
Coefficients from linear models can be used to generate these.
Links to cool points
PDP’s can be used to relate one or two independent variables to the dependent variable. The limitation to two is only because visualization of more than three variables is hard.
What does a line plot of a PDP for one independent variable look like?
What does a heat map of a PDP for two independent variables look like?
Code, Linear Regression and R^2 score
Linear Regression Coefficients
Linear regression models will miss non-linearities.
Gradient Boost models can better fit non-linearities, but then do not produce coefficients.
NB: Whether to use training data or validation data or combination is not currently decided.
On the animation, lines joining points of a color are ICE curves (Individual Conditional Expectation).
-
module pdpbox.pdp
-
functions
- pdp_isolate_ and
- pdp_plot