bio-machine-learning-prediction-explanation
Explains machine learning predictions on omics data using SHAP values and LIME for feature attribution. Identifies which genes or features drive classifier decisions. Use when interpreting biomarker classifiers or understanding model predictions.
npx skills add majiayu000/claude-skill-registry --skill prediction-explanation --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 Interpretation for Omics Classifiers ## SHAP TreeExplainer (v0.47+ API) ```python import shap from sklearn.ensemble import RandomForestClassifier model = RandomForestClassifier(n_estimators=100, random_state=42) model.fit(X_train, y_train) explainer = shap.TreeExplainer(model) # CORRECT (v0.47+): Call explainer directly, NOT .shap_values() shap_values = explainer(X_test) # shap_values is an Explanation object # .values has shape (n_samples, n_features) for binary # .base_values has expected value print(f'SHAP values shape: {shap_values.values.shape}') ``` ## Summary Plot (Global Feature Importance) ```python import shap import matplotlib.pyplot as plt # Beeswarm plot: shows impact direction and magnitude shap.plots.beeswarm(shap_values, max_display=20, show=False) plt.tight_layout() plt.savefig('shap_summary.png', dpi=150, bbox_inches='tight') plt.close() # Bar plot: mean absolute SHAP values shap.plots.bar(shap_values, max_display=20, show=False) plt.savefig('shap_bar.png', dpi=150, bbox_inches='tight') ``` ## Force Plot (Individual Prediction) ```python # Explain single prediction sample_idx = 0 shap.plots.force(shap_values[sample_idx], matplotlib=True, show=False) plt.sa
- SHAP TreeExplainer (v0.47+ API)
- Summary Plot (Global Feature Importance)
- Force Plot (Individual Prediction)
- SHAP for XGBoost
- LIME (Local Interpretable Model-agnostic Explanations)
- Extract Top Features from SHAP
- Dependence Plot (Feature Interactions)
- Multi-class SHAP
- Related Skills
What does the bio-machine-learning-prediction-explanation skill do?
Explains machine learning predictions on omics data using SHAP values and LIME for feature attribution. Identifies which genes or features drive classifier decisions. Use when interpreting biomarker classifiers or understanding model predictions.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill prediction-explanation --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.
