liveBook · Manning

SHAP

As explained in Build AI Drug Discovery Pipelines

SHAP is a model-interpretation method that attributes a prediction to input features using Shapley-value-based contributions.

SHAP interprets a prediction by treating input descriptors as a coalition and estimating each descriptor’s contribution through Shapley values. A surrogate explanation makes a complex model easier to understand. section 6.4.3

Use SHAP to inspect model behavior at several levels:

  • Prefer SHAP for tree ensembles when finite-difference derivatives are unreliable because predictions remain constant within leaves. section 6.4.3

RNA-binding model

Fit an XGBoost classifier, create shap.TreeExplainer(model), calculate values for up to 5,000 molecules, and visualize descriptor effects globally and locally.

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Defines coalition-based contributions and demonstrates Python usage, while deferring detailed computation beyond the marginal-contribution intuition.
Examples
Uses molecular descriptors, caffeine, RNA binders, XGBoost, cohort plots, scatter plots, and waterfall plots.
What it assumes
Assumes a fitted predictive model and molecular descriptors, while introducing surrogate models and Shapley-value reasoning.
What you can do after
Diagnose model behavior with SHAP explanations for descriptor importance, cohorts, individual compounds, and feature effects.
How it connects
Connects surrogate models, Shapley values, feature importance, permutation-based importance, and model interpretation.

Also explained in

Compare how 6 books explain SHAP →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.