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: Helper Function to save the heatmap.
  
  Args:
      iteration: current iteration
      dataset: dataset object with its own class definition in datasets
          folder inherits from class StandardDataset.
      predictions: predictions of the model self on dataset.
      vmin: see documentation of heatmap.py heat_map function
      vmax: see documentation of heatmap.py heat_map function
  
  Returns:
      (vmin, vmax)
docstr_tok: ["Helper","Function","to","save","the","heatmap",".","Args",":","iteration",":","current","iteration","dataset",":","dataset","object","with","its","own","class","definition","in","datasets","folder","inherits","from","class","StandardDataset",".","predictions",":","predictions","of","the","model","self","on","dataset",".","vmin",":","see","documentation","of","heatmap.py","heat_map","function","vmax",":","see","documentation","of","heatmap.py","heat_map","function","Returns",":","(","vmin",",","vmax",")"]
code: def save_heatmap(self, iteration, dataset, predictions, vmin, vmax):
      """Helper Function to save the heatmap.
  
      Args:
          iteration: current iteration
          dataset: dataset object with its own class definition in datasets
              folder inherits from class StandardDataset.
          predictions: predictions of the model self on dataset.
          vmin: see documentation of heatmap.py heat_map function
          vmax: see documentation of heatmap.py heat_map function
  
      Returns:
          (vmin, vmax)
      """
  
      X, X_prime, y = clean.extract_df_from_ds(dataset)
      # save heatmap every heatmap_iter iterations or the last iteration
      if self.heatmapflag and (iteration % self.heatmap_iter) == 0:
          # initial heat map
          X_prime_heat = X_prime.iloc[:, 0:2]
          eta = 0.1
          minmax = heatmap.heat_map(
              X,
              X_prime_heat,
              y,
              predictions,
              eta,
              self.heatmap_path
              + "/heatmap_iteration_{}".format(iteration),
              vmin,
              vmax,
          )
          if iteration == 1:
              vmin = minmax[0]
              vmax = minmax[1]
      return vmin, vmax
  
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 5 for calling the GerryFairClassifier obj's underlying member method code with example usage: obj.save_heatmap(iteration, dataset, predictions, vmin, vmax) and returns: vmin,  vmax