liveBook · Manning

Local surrogate method

As explained in Ensemble Methods for Machine Learning

A local surrogate model approximates a black-box model's behavior in the neighborhood of a particular example.

A local surrogate method explains one prediction by fitting an interpretable model near the example of interest. LIME uses a linear model to approximate a black-box model’s behavior in that neighborhood, rather than imitating the black box everywhere. section 9.4.1

LIME builds the explanation procedurally:

  • Start with the example whose prediction needs explanation. section 9.4.1
  • Generate surrogate training examples by perturbing features around that example. section 9.6
  • Fit a linear surrogate using a weighted mean-squared-error loss that balances fidelity with interpretability. section 9.4.1

Explaining a subscription prediction

A LIME explainer can be configured for an XGBoost subscription classifier with feature names and categorical-feature metadata. For a true-positive test example, features supporting subscription appear on the positive side of the explanation, while features opposing it appear on the negative side.

How Ensemble Methods for Machine Learning covers it

How deep it goes
Defines perturbation, distance weighting, weighted loss, and fidelity-interpretability tradeoffs, but stops short of full implementation details.
Examples
Uses a subscription classifier, XGBoost predictions, perturbed tabular examples, and signed feature-contribution displays.
What it assumes
Assumes a black-box model and an example whose prediction requires explanation.
What you can do after
Diagnose individual predictions by generating local feature contributions with LIME.
How it connects
Connects black-box models, linear models, local interpretability, model-agnostic explanation, and fidelity-interpretability tradeoffs.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Ensemble Methods for Machine Learning. The section links point to the parts of the book it draws on.