Skip to content
Quantoros

Why does explaining log loss require labels even though ordinary prediction explanations do not?

Classic MLLevel: IntermediateSHAP · TreeExplainer

Why does explaining log loss require labels even though ordinary prediction explanations do not?

Hints
  • Prediction and error are different functions.
  • One of them takes the true outcome as an argument.

Answer

Loss depends on both prediction and observed outcome. Supply aligned labels for every explained row; changing the label can change loss attribution even when features and prediction remain fixed.

Source and licence: SHAP · TreeExplainer · MIT · answer: Quantoros editorial

Related questions