model-interpretability
Interpret ML model predictions using SHAP, LIME, attention visualization, and probing techniques. Use when explaining model decisions, debugging model behavior, or building trust in ML systems.
npx skills add majiayu000/claude-skill-registry --skill model-interpretability --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Model Interpretability ## SHAP (SHapley Additive exPlanations) ### TreeSHAP for Tree Models ```python import shap def explain_tree_model(model, X_train, X_explain): explainer = shap.TreeExplainer(model) shap_values = explainer.shap_values(X_explain) return explainer, shap_values def visualize_shap(explainer, shap_values, X_explain, feature_names=None): shap.summary_plot(shap_values, X_explain, feature_names=feature_names) shap.dependence_plot(0, shap_values, X_explain, feature_names=feature_names) shap.force_plot(explainer.expected_value, shap_values[0], X_explain[0], feature_names=feature_names, matplotlib=True) shap.waterfall_plot(shap.Explanation( values=shap_values[0], base_values=explainer.expected_value, data=X_explain[0], feature_names=feature_names, )) ``` ### DeepSHAP for Neural Networks ```python def explain_neural_network(model, X_background, X_explain): background = torch.tensor(X_background[:100], dtype=torch.float32) explainer = shap.DeepExplainer(model, background) shap_values = explainer.shap_values(torch.tensor(X_explain, dtype=torch.float32)) return explainer, shap_values def explain_image_model(model, images, class_idx=None): explainer = shap.GradientExplainer(
- SHAP (SHapley Additive exPlanations)
- TreeSHAP for Tree Models
- DeepSHAP for Neural Networks
- LIME
- Tabular Data
- Text Data
- Image Data
- Attention Visualization
- Attention Caveats
- Integrated Gradients
- Probing Classifiers
- Captum Library
- Key Pitfalls
What does the model-interpretability skill do?
Interpret ML model predictions using SHAP, LIME, attention visualization, and probing techniques. Use when explaining model decisions, debugging model behavior, or building trust in ML systems.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill model-interpretability --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
