class_docstr: This is the Auditor class. It is used in the training algorithm to repeatedly find subgroups that break the
  fairness disparity constraint. You can also use it independently as a stand alone auditor.
class_docstr_tok: ["This","is","the","Auditor","class",".","It","is","used","in","the","training","algorithm","to","repeatedly","find","subgroups","that","break","the","fairness","disparity","constraint",".","You","can","also","use","it","independently","as","a","stand","alone","auditor","."]
docstr: Recursively update the costs from incorrectly predicting 1 for the learner.
  
  Args:
      :param c_0: current costs for predicting 0
      :param c_1: current costs for predicting 1
      :param group: last group found by the auditor, object of class Group.
      :param C: see Model class for details.
      :param iteration: current iteration
      :param gamma: target disparity
  
  Returns:
      :return c_0, c_1: tuples of new costs for CSC problem of learner
docstr_tok: ["Recursively","update","the","costs","from","incorrectly","predicting","1","for","the","learner",".","Args",":",":","param","c_0",":","current","costs","for","predicting","0",":","param","c_1",":","current","costs","for","predicting","1",":","param","group",":","last","group","found","by","the","auditor",",","object","of","class","Group",".",":","param","C",":","see","Model","class","for","details",".",":","param","iteration",":","current","iteration",":","param","gamma",":","target","disparity","Returns",":",":","return","c_0",",","c_1",":","tuples","of","new","costs","for","CSC","problem","of","learner"]
code: def update_costs(self, c_0, c_1, group, C, iteration, gamma):
      """Recursively update the costs from incorrectly predicting 1 for the learner.
  
      Args:
          :param c_0: current costs for predicting 0
          :param c_1: current costs for predicting 1
          :param group: last group found by the auditor, object of class Group.
          :param C: see Model class for details.
          :param iteration: current iteration
          :param gamma: target disparity
  
      Returns:
          :return c_0, c_1: tuples of new costs for CSC problem of learner
      """
  
      # make costs mutable type
      c_0 = list(c_0)
      c_1 = list(c_1)
  
      pos_neg = group.disparity_direction
      n = len(self.y)
  
      g_members = group.func.predict(self.X_prime_0)
      m = self.X_prime_0.shape[0]
      g_weight = np.sum(g_members) * (1.0 / float(m))
      for i in range(n):
          X_prime_0_index = 0
          if self.y[i] == 0:
              new_group_cost = (
                  (1.0 / n)
                  * pos_neg
                  * C
                  * (1.0 / iteration)
                  * (g_weight - g_members[X_prime_0_index])
              )
              if np.abs(group.weighted_disparity) < gamma:
                  new_group_cost = 0
  
              if self.fairness_def == "FP":
                  c_1[i] = (
                      (c_1[i] - 1.0 / n)
                      * ((iteration - 1.0) / iteration)
                      + new_group_cost
                      + 1.0 / n
                  )
              elif self.fairness_def == "FN":
                  c_0[i] = (
                      (c_0[i] - 1.0 / n)
                      * ((iteration - 1.0) / iteration)
                      + new_group_cost
                      + 1.0 / n
                  )
  
              X_prime_0_index += 1
          else:
              if self.fairness_def == "FP":
                  c_1[i] = -1.0 / n
              elif self.fairness_def == "FN":
                  c_0[i] = -1.0 / n
      return tuple(c_0), tuple(c_1)
  
file_path: AIF360/aif360/algorithms/inprocessing/gerryfair/auditor.py
imports: import numpy
  import pandas
  from sklearn import linear_model
  from aif360.algorithms.inprocessing.gerryfair.reg_oracle_class import RegOracle
  from aif360.algorithms.inprocessing.gerryfair import clean
label_desc: Use image node_id 4 for calling the Auditor obj's underlying member method code with example usage: obj.update_costs(c_0, c_1, group, C, iteration, gamma) and returns: tuple,  tuple