class_docstr: Adversarial debiasing is an in-processing technique that learns a
  classifier to maximize prediction accuracy and simultaneously reduce an
  adversary's ability to determine the protected attribute from the
  predictions [5]_. This approach leads to a fair classifier as the
  predictions cannot carry any group discrimination information that the
  adversary can exploit.
  
  References:
      .. [5] B. H. Zhang, B. Lemoine, and M. Mitchell, "Mitigating Unwanted
         Biases with Adversarial Learning," AAAI/ACM Conference on Artificial
         Intelligence, Ethics, and Society, 2018.
docstr: Args:
      unprivileged_groups (tuple): Representation for unprivileged groups
      privileged_groups (tuple): Representation for privileged groups
      scope_name (str): scope name for the tenforflow variables
      sess (tf.Session): tensorflow session
      seed (int, optional): Seed to make `predict` repeatable.
      adversary_loss_weight (float, optional): Hyperparameter that chooses
          the strength of the adversarial loss.
      num_epochs (int, optional): Number of training epochs.
      batch_size (int, optional): Batch size.
      classifier_num_hidden_units (int, optional): Number of hidden units
          in the classifier model.
      debias (bool, optional): Learn a classifier with or without
          debiasing.
docstr_tok: ["Args",":","unprivileged_groups","(","tuple",")",":","Representation","for","unprivileged","groups","privileged_groups","(","tuple",")",":","Representation","for","privileged","groups","scope_name","(","str",")",":","scope","name","for","the","tenforflow","variables","sess","(","tf.Session",")",":","tensorflow","session","seed","(","int",",","optional",")",":","Seed","to","make","`","predict","`","repeatable",".","adversary_loss_weight","(","float",",","optional",")",":","Hyperparameter","that","chooses","the","strength","of","the","adversarial","loss",".","num_epochs","(","int",",","optional",")",":","Number","of","training","epochs",".","batch_size","(","int",",","optional",")",":","Batch","size",".","classifier_num_hidden_units","(","int",",","optional",")",":","Number","of","hidden","units","in","the","classifier","model",".","debias","(","bool",",","optional",")",":","Learn","a","classifier","with","or","without","debiasing","."]
code: def __init__(
      self,
      unprivileged_groups,
      privileged_groups,
      scope_name,
      sess,
      seed=None,
      adversary_loss_weight=0.1,
      num_epochs=50,
      batch_size=128,
      classifier_num_hidden_units=200,
      debias=True,
  ):
      """
      Args:
          unprivileged_groups (tuple): Representation for unprivileged groups
          privileged_groups (tuple): Representation for privileged groups
          scope_name (str): scope name for the tenforflow variables
          sess (tf.Session): tensorflow session
          seed (int, optional): Seed to make `predict` repeatable.
          adversary_loss_weight (float, optional): Hyperparameter that chooses
              the strength of the adversarial loss.
          num_epochs (int, optional): Number of training epochs.
          batch_size (int, optional): Batch size.
          classifier_num_hidden_units (int, optional): Number of hidden units
              in the classifier model.
          debias (bool, optional): Learn a classifier with or without
              debiasing.
      """
      super(AdversarialDebiasing, self).__init__(
          unprivileged_groups=unprivileged_groups,
          privileged_groups=privileged_groups,
      )
  
      self.scope_name = scope_name
      self.seed = seed
  
      self.unprivileged_groups = unprivileged_groups
      self.privileged_groups = privileged_groups
      if (
          len(self.unprivileged_groups) > 1
          or len(self.privileged_groups) > 1
      ):
          raise ValueError(
              "Only one unprivileged_group or privileged_group supported."
          )
      self.protected_attribute_name = list(
          self.unprivileged_groups[0].keys()
      )[0]
  
      self.sess = sess
      self.adversary_loss_weight = adversary_loss_weight
      self.num_epochs = num_epochs
      self.batch_size = batch_size
      self.classifier_num_hidden_units = classifier_num_hidden_units
      self.debias = debias
  
      self.features_dim = None
      self.features_ph = None
      self.protected_attributes_ph = None
      self.true_labels_ph = None
      self.pred_labels = None
  
file_path: AIF360/aif360/algorithms/inprocessing/adversarial_debiasing.py
imports: import numpy
  from aif360.algorithms import Transformer
label_desc: Use image node_id 1 to create a new AdversarialDebiasing object from inherited base classes: Transformer with example: obj = AdversarialDebiasing(unprivileged_groups, privileged_groups, scope_name, sess, seed, adversary_loss_weight, num_epochs, batch_size, classifier_num_hidden_units, debias)