Partition SHAP - Explanations of the target class only

43 views Asked by At

I would like to calculate the explanations of the target classes only. I know this:

shape_values_train = e(x_train, max_evals=2000, batch_size=50, outputs=shap.Explanation.argsort.flip[:1])

explanations of only the most probable classes according to the model are returned.

And, by removing outputs, the explanations on all classes are calculated.

What if I wanted to compute explanations only on the true classes of the dataset? There is shap.Explanation.output_indexes in the documentation, but it's not clear how to use it.

0

There are 0 answers