code: def kernel_shap_classification(self, model, X_train, prediction_col):
      # use Kernel SHAP to explain test set predictions
      explainer = shap.KernelExplainer(model.predict_proba, X_train)
      shap_values = explainer.shap_values(X_train, nsamples=100)
  
      pd_shap = self.select_row_shap_values(shap_values, prediction_col)
      all_columns = list(X_train.columns)
  
      shap_columns = []
  
      for i in all_columns:
          shap_columns.append(i + "_impact")
      pd_shap.columns = shap_columns
  
      Y = X_train.copy()
      for c in shap_columns:
          Y[c] = list(pd_shap[c])
  
      return Y, explainer
  
file_path: explainx/lib/calculate_shap.py
imports: from imports import *
  from rescale_numeric_feature import *
label_desc: Use image node_id 5 for calling the calculate_shap obj's underlying member method code with example usage: obj.kernel_shap_classification(model, X_train, prediction_col) and returns: Y,  explainer