Local Interpretation with LIME
After training our model, we usually use it for predicting outcomes on unseen data. The global interpretations we saw earlier, such as model coefficient, variable importance, and the partial dependence plot, gave us a lot of information on the features at an overall level. Sometimes we want to understand what has influenced the model for a specific case to predict a specific outcome. For instance, if your model is to assess the risk of offering credit to a new client, you may want to understand why it rejected the case for a specific lead. This is what local interpretation is for: analyzing a single observation and understanding the rationale behind the model's decision. In this section, we will introduce you to a technique called Locally Interpretable Model-Agnostic Explanations (LIME).
If we are using a linear model, it is extremely easy to understand the contribution of each variable to the predicted outcome. We just need to look at the...