code: def insight_2_global_feature_impact(
      self, df, outcome, expected_values, classes=[0, 1]
  ):
      top_positive_variables = []
      average_shap_values_positive = []
  
      top_negative_variables = []
      average_shap_values_negative = []
  
      for i in range(1, 4):
          top_positive_variables.append(df.iloc[-1 * (i + 1)][0])
          average_shap_values_positive.append(df.iloc[-1 * (i + 1)][1])
  
          top_negative_variables.append(df.iloc[i][0])
          average_shap_values_negative.append(df.iloc[i][1])
  
      sentences = []
      sentences.append(
          "Your model has {:.2%} confidence that the overall outcome will be {}.".format(
              expected_values[outcome], outcome
          )
      )
  
      sentences.append(
          "\nOverall, on average, the top three variables influencing the model's prediction outcome are {} ({:.2%}), {} ({:.2%}), {} ({:.2%})".format(
              top_positive_variables[0],
              average_shap_values_positive[0],
              top_positive_variables[1],
              average_shap_values_positive[1],
              top_positive_variables[2],
              average_shap_values_positive[2],
          )
      )
  
      sentences.append(
          "\nOverall, on average, the top three variables influencing the model's prediction outcome are {} ({:.2%}), {} ({:.2%}), {} ({:.2%})".format(
              top_negative_variables[0],
              average_shap_values_negative[0],
              top_negative_variables[1],
              average_shap_values_negative[1],
              top_negative_variables[2],
              average_shap_values_negative[2],
          )
      )
  
      # sentences.append("\nOverall, on average, the top three variables influencing the model's prediction outcome are" +
      #                   + "{}, ({})".format(top_positive_variables[0], str(round(average_shap_values_positive[0] * 100, 2))) +
      #                   "{}, ({})".format(top_positive_variables[1], str(round(average_shap_values_positive[1] * 100, 2))) +
      #                   "{}, ({})".format(top_positive_variables[2], str(round(average_shap_values_positive[2] * 100, 2))) +
      #                  + "\n")
  
      # sentences.append("\nOverall, on average, the top three variables influencing the model's prediction outcome are" +
      #                   + "{}, ({})".format(top_negative_variables[0], str(round(average_shap_values_negative[0] * 100, 2))) +
      #                   "{}, ({})".format(top_negative_variables[1], str(round(average_shap_values_negative[1] * 100, 2))) +
      #                   "{}, ({})".format(top_negative_variables[2], str(round(average_shap_values_negative[2] * 100, 2))) +
      #                  + "\n")
  
      # sentences.append("On average, the variable " +
      #                  top_negative_variables[0] + ", " +
      #                  top_negative_variables[1] + ",and " +
      #                  top_negative_variables[2] + " " +
      #                  "will change the probability for achieving outcome = " +
      #                  str(outcome)
      #                  + " by " +
      #                  str(round(average_shap_values_negative[0] * 100, 2)) + "%," +
      #                  str(round(average_shap_values_negative[1] * 100, 2)) + "%, and" +
      #                  str(round(average_shap_values_negative[2] * 100, 2)) + "% respectively.")
  
      sentences.append("")
  
      return sentences
  
file_path: explainx/lib/insight_classification.py
imports: from imports import *
label_desc: Use image node_id 3 for calling the insight_classification obj's underlying member method code with example usage: obj.insight_2_global_feature_impact(df, outcome, expected_values, classes) and returns: sentences