What problem does it solve? Production ML models often behave as black boxes, making it hard to debug mispredictions, detect bias, satisfy regulatory audits, or trace requests across inference pipelines. This Skill provides the code patterns and scripts to explain predictions, log every inference, and measure fairness across segments. ## Core Features & Use Cases - Model Explainability: Generate SHAP (Tree, Kernel, Deep, Gradient explainers) and LIME explanations for sklearn, XGBoost, LightGBM, and PyTorch models, with global feature importance and per-instance attributions. - Prediction Logging & Audit Trails: Log structured prediction records to SQLite or JSONL with unique request IDs, then query, compute statistics, detect anomalies with Isolation Forest, and export to CSV/Parquet. - Fairness & Slice Analysis: Compute disparate impact, equal opportunity, and equalized odds metrics across demographic groups, plus slice-based performance analysis by cohort. - Use Case: A credit-scoring model's accuracy drops for one customer segment. Use the explainability script to generate SHAP values for failing predictions, run slice analysis to isolate the underperforming cohort, and produce fairness metrics for an ECOA compliance review. ## Quick Start Ask the AI to explain why the model in model.pkl mispredicted row 42 of data.csv using SHAP and save the plots to an explanations folder.