code: def add_shap_row(self, input_data, row_number):
      if is_classification(self.model):
          explainer, pred, pred_prob = self.shap_explainer()
      else:
          explainer, pred = self.shap_explainer()
  
      if type(explainer) == shap.explainers._tree.Tree:
          shap_values = explainer.shap_values(input_data)
  
          shap_row = self.append_shap_values_to_df(
              input_sv=shap_values[0],
              in_data=input_data.copy(),
              scope="local",
          )
  
          shap_row["Model Decision"] = pred(pd.DataFrame(input_data))[0]
          shap_row["Actual Decision"] = self.actual_data[row_number]
  
          if is_classification(self.model):
              probabilities = pred_prob(np.array(input_data))
              for i in range(len(np.unique(self.actual_data))):
                  shap_row[
                      "Probability: {}".format(
                          np.unique(self.actual_data)[i]
                      )
                  ] = probabilities[:, i][0]
  
          return shap_row
      else:
          shap_values = explainer.shap_values(input_data)
  
          shap_row = self.append_shap_values_to_df(
              input_sv=shap_values,
              in_data=input_data.copy(),
              scope="local",
          )
  
          shap_row["Model Decision"] = pred(pd.DataFrame(input_data).T)[
              0
          ]
          if is_classification(self.model):
              probabilities = pred_prob([np.array(input_data)])
              for i in range(len(np.unique(self.actual_data))):
                  shap_row[
                      "Probability: {}".format(
                          np.unique(self.actual_data)[i]
                      )
                  ] = probabilities[:, i][0]
          return shap_row
  
file_path: explainx/lib/frameworks/shapley_values.py
imports: from operator import is_
  import shap
  from explainx.lib.utils import is_classification
  import pandas
  import numpy
label_desc: Use image node_id 8 for calling the ShapleyValues obj's underlying member method code with example usage: obj.add_shap_row(input_data, row_number) and returns: shap_row, shap_row