Data Scientist interview question
How do you explain a model prediction?
Explain a prediction with the model's intended use, baseline, influential features and direction, uncertainty, and limitations. Use local attribution carefully, validate it against model behavior, and never present correlation as a causal reason.
Direct answer
What a strong answer covers
How it works
An explanation answers why this prediction for this input, in terms the recipient can act on. It starts with what the model is for and what a typical or baseline prediction looks like, then names the few features that moved this prediction most and in which direction, using local attribution methods such as SHAP whose outputs are checked against the model’s actual behaviour on perturbed inputs. It states uncertainty and known limitations, and it avoids implying that a feature causes the outcome when the model only learned an association. For regulated decisions, the explanation is consistent and reproducible for the same input.
Example
A loan application was declined with a score of 0.31 against a threshold of 0.5; the explanation listed a recent missed payment, a high credit utilisation ratio, and a short account history as the top contributors, each with its direction, and noted that income had a small positive effect. The compliance team verified that the same input produced the same reason codes across model versions and that the codes matched a documented adverse-action list.
Common mistakes
- Presenting feature importance from the whole model as an explanation of one prediction.
- Reporting attributions without checking that changing the feature changes the output.
- Telling a user that a feature caused the outcome when it is only correlated.
A useful answer structure
Answer from your own work.
Do not memorise a script: use only examples you can explain honestly in follow-up questions.
Open the desktop workspace and rehearse a clear answer in your own words.