Skip to content
Quantoros

A custom SHAP masker returns one masked vector when the explainer expects a matrix of samples. Why is this more than a…

Classic MLLevel: IntermediateSHAP · PermutationExplainer

A custom SHAP masker returns one masked vector when the explainer expects a matrix of samples. Why is this more than a shape inconvenience?

Hints
  • The masker describes a distribution of replacements.
  • Its rows are evaluations to integrate, not extra features.

Answer

The model outputs over the masked sample matrix are averaged to represent missing-feature uncertainty. Returning the wrong structure changes or breaks that integration contract; test dimensions, feature ordering and averaging semantics together.

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

Related questions