# Shap values on scaled dataset

I am working on a binary classification problem for heart disease prediction.

I have scaled the dataset using Standard Scaler and I am trying to understand the model generated using SHAP values however is there a way to inverse transform the shap values so that I can see which columns affected the prediction?

I tried the below but it didn't work:

What I want is something like this:

• Do you want the plots to display column names? Dec 20 '20 at 17:41
• yes, I have edited the question and attached a sample image Dec 20 '20 at 17:49

## 1 Answer

X_test_scaled probably is a numpy array or matrix. You can transform it to a dataframe with column names by doing something like:

df = pd.DataFrame(data=X_test_scaled, columns=["colname1","colname2",...,"colnameX"])


This should be enough for shap.force_plot display the columns names after:

shap.force_plot(explainer.expected_value, shap_values[0,:], df[0,:])