Explaining ICE plots
ICE plots are the answer to the question: What if my PDP plots obscure the variance in my feature-target relationships? Indeed, when you are trying to understand how a feature relates to the prediction of a model, a lot can be lost by averaging it out. If you take a close look at the PDP plots for individual features, many of them have thin lines that are not only distant from the average thick line but don't even follow its general direction. These variations can provide additional insight—and, by the way, the thin lines are essentially what ICE plots are about, except you can do much more with them.
ICE plots can include all of your datasets, but having many lines in your plots can be computationally expensive and—more importantly—difficult to appreciate. This is why it's recommended to either sample your dataset or plot the lines with transparency.
We will use both approaches, but let's first sample the dataset. We...