A model explanation report (XAI)
Usage description
Generate global and local explanations for a trained model, with their limits.
Prompt text
I have a model trained ({{stack}}) on {{project}}.
Create an explanation report that includes:
1. Feature importance with permutation importance on the validation data.
2. Global and local SHAP explanations for three cases (correct, wrong and borderline).
3. Partial dependence curves (PDP/ICE) for the three most important features.
4. A "limits of the explanation" section: correlation between features, non-causality and stability.
Write the code, run it and show the actual output. {{extra}}Required inputs
The model and the data.
Expected outputs
Code, plots and a written report.
Suitable tools
Practical example
stack = "XGBoost", project = "university admission data".
We do not claim this prompt was tested on a particular model; results vary with the model and context, so always review the output.
