class_docstr: Model is an algorithm for learning classifiers that are fair with respect
  to rich subgroups.
  
  Rich subgroups are defined by (linear) functions over the sensitive
  attributes, and fairness notions are statistical: false positive, false
  negative, and statistical parity rates. This implementation uses a max of
  two regressions as a cost-sensitive classification oracle, and supports
  linear regression, support vector machines, decision trees, and kernel
  regression. For details see:
  
  References:
      .. [1] "Preventing Fairness Gerrymandering: Auditing and Learning for
         Subgroup Fairness." Michale Kearns, Seth Neel, Aaron Roth, Steven Wu.
         ICML '18.
      .. [2] "An Empirical Study of Rich Subgroup Fairness for Machine
         Learning". Michael Kearns, Seth Neel, Aaron Roth, Steven Wu. FAT '19.
docstr: Assumes Model has FP specified for metric. Trains for each value of
  gamma, returns error, FP (via training), and FN (via auditing) values.
  
  Args:
      dataset: dataset object with its own class definition in datasets
          folder inherits from class StandardDataset.
      gamma_list: the list of gamma values to generate the pareto curve
  
  Returns:
      list of errors, list of fp violations of those models, list of fn
      violations of those models
docstr_tok: ["Assumes","Model","has","FP","specified","for","metric",".","Trains","for","each","value","of","gamma",",","returns","error",",","FP","(","via","training",")",",","and","FN","(","via","auditing",")","values",".","Args",":","dataset",":","dataset","object","with","its","own","class","definition","in","datasets","folder","inherits","from","class","StandardDataset",".","gamma_list",":","the","list","of","gamma","values","to","generate","the","pareto","curve","Returns",":","list","of","errors",",","list","of","fp","violations","of","those","models",",","list","of","fn","violations","of","those","models"]
code: def pareto(self, dataset, gamma_list):
      """Assumes Model has FP specified for metric. Trains for each value of
      gamma, returns error, FP (via training), and FN (via auditing) values.
  
      Args:
          dataset: dataset object with its own class definition in datasets
              folder inherits from class StandardDataset.
          gamma_list: the list of gamma values to generate the pareto curve
  
      Returns:
          list of errors, list of fp violations of those models, list of fn
          violations of those models
      """
  
      C = self.C
      max_iters = self.max_iters
  
      # Store errors and fp over time for each gamma
  
      # change var names, but no real dependence on FP logic
      all_errors = []
      all_fp_violations = []
      all_fn_violations = []
      self.C = C
      self.max_iters = max_iters
  
      auditor = Auditor(dataset, "FN")
      for g in gamma_list:
          self.gamma = g
          fitted_model = self.fit(dataset, early_termination=True)
          errors, fairness_violations = (
              fitted_model.errors,
              fitted_model.fairness_violations,
          )
          predictions = array_to_tuple((self.predict(dataset)).labels)
          _, fn_violation = auditor.audit(predictions)
          all_errors.append(errors[-1])
          all_fp_violations.append(fairness_violations[-1])
          all_fn_violations.append(fn_violation)
  
      return all_errors, all_fp_violations, all_fn_violations
  
file_path: AIF360/aif360/algorithms/inprocessing/gerryfair_classifier.py
imports: import copy
  from aif360.algorithms.inprocessing.gerryfair import heatmap
  from aif360.algorithms.inprocessing.gerryfair.clean import array_to_tuple
  from aif360.algorithms.inprocessing.gerryfair.learner import Learner
  from aif360.algorithms.inprocessing.gerryfair.auditor import *
  from aif360.algorithms.inprocessing.gerryfair.classifier_history import ClassifierHistory
  from aif360.algorithms import Transformer
label_desc: Use image node_id 7 for calling the GerryFairClassifier obj's underlying member method code with example usage: obj.pareto(dataset, gamma_list) and returns: all_errors,  all_fp_violations,  all_fn_violations