3
$\begingroup$

Using Python, I created a neural network to perform predictions on a binary class dataset (e.g. will a passenger survive the Titanic?). I am using the SHAP package to explain individual predictions. For all of the instances in this dataset, the visualization outputted by SHAP has an output value of 0 and the higher/lower graph is empty (there are no features listed).

shap.force_plot(k_explainer.expected_value[0], k_shap_values[0], label_test_X.iloc[0])

When I use a different dataset and run the line above, SHAP outputs a graph and lists features.

What does an empty SHAP graph mean, especially in this case where there is an empty graph for each instance of a dataset? I am reading the documentation to help understand this situation, but I appreciate any insight into this.

Thank you in advance for the help!

$\endgroup$
2
  • 2
    $\begingroup$ Are you sure this is not due to a problem with your variables ? (Basically a NAN somewhere, or a bad formatting) $\endgroup$ Commented Jan 24, 2020 at 15:50
  • $\begingroup$ What are the actual shap values? How does the model perform? $\endgroup$
    – Ben Reiniger
    Commented Jul 30 at 13:02

1 Answer 1

0
$\begingroup$

that means shap values were nan.Model was not able to compute shap values.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.