class_docstr: Debiasing with adversarial learning.
  
  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 [#zhang18]_. This approach leads to a fair classifier as the
  predictions cannot carry any group discrimination information that the
  adversary can exploit.
  
  References:
      .. [#zhang18] `B. H. Zhang, B. Lemoine, and M. Mitchell, "Mitigating
         Unwanted Biases with Adversarial Learning," AAAI/ACM Conference on
         Artificial Intelligence, Ethics, and Society, 2018.
         <https://dl.acm.org/citation.cfm?id=3278779>`_
  
  Attributes:
      prot_attr_ (str or list(str)): Protected attribute(s) used for
          debiasing.
      groups_ (array, shape (n_groups,)): A list of group labels known to the
          classifier.
      classes_ (array, shape (n_classes,)): A list of class labels known to
          the classifier.
      sess_ (tensorflow.Session): The TensorFlow Session used for the
          computations. Note: this can be manually closed to free up resources
          with `self.sess_.close()`.
      classifier_logits_ (tensorflow.Tensor): Tensor containing output logits
          from the classifier.
      adversary_logits_ (tensorflow.Tensor): Tensor containing output logits
          from the adversary.
class_docstr_tok: ["Debiasing","with","adversarial","learning",".","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","[","#","zhang18","]","_",".","This","approach","leads","to","a","fair","classifier","as","the","predictions","can","not","carry","any","group","discrimination","information","that","the","adversary","can","exploit",".","References",":","..","[","#","zhang18","]","`","B.","H.","Zhang",",","B.","Lemoine",",","and","M.","Mitchell",",","``","Mitigating","Unwanted","Biases","with","Adversarial","Learning",",","''","AAAI\/ACM","Conference","on","Artificial","Intelligence",",","Ethics",",","and","Society",",","2018",".","<","https",":","\/\/dl.acm.org\/citation.cfm","?","id=3278779",">","`","_","Attributes",":","prot_attr_","(","str","or","list","(","str",")",")",":","Protected","attribute","(","s",")","used","for","debiasing",".","groups_","(","array",",","shape","(","n_groups",",",")",")",":","A","list","of","group","labels","known","to","the","classifier",".","classes_","(","array",",","shape","(","n_classes",",",")",")",":","A","list","of","class","labels","known","to","the","classifier",".","sess_","(","tensorflow.Session",")",":","The","TensorFlow","Session","used","for","the","computations",".","Note",":","this","can","be","manually","closed","to","free","up","resources","with","`","self.sess_.close","(",")","`",".","classifier_logits_","(","tensorflow.Tensor",")",":","Tensor","containing","output","logits","from","the","classifier",".","adversary_logits_","(","tensorflow.Tensor",")",":","Tensor","containing","output","logits","from","the","adversary","."]
docstr: Predict class labels for the given samples.
  
  Args:
      X (pandas.DataFrame): Test samples.
  
  Returns:
      numpy.ndarray: Predicted class label per sample.
docstr_tok: ["Predict","class","labels","for","the","given","samples",".","Args",":","X","(","pandas.DataFrame",")",":","Test","samples",".","Returns",":","numpy.ndarray",":","Predicted","class","label","per","sample","."]
code: def predict(self, X):
      """Predict class labels for the given samples.
  
      Args:
          X (pandas.DataFrame): Test samples.
  
      Returns:
          numpy.ndarray: Predicted class label per sample.
      """
      scores = self.decision_function(X)
      if scores.ndim == 1:
          indices = (scores > 0).astype(int)
      else:
          indices = scores.argmax(axis=1)
      return self.classes_[indices]
  
file_path: AIF360/aif360/sklearn/inprocessing/adversarial_debiasing.py
imports: import numpy
  import scipy.special
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.preprocessing import LabelEncoder
  from sklearn.utils import check_random_state
  from sklearn.utils.validation import check_is_fitted
  from aif360.sklearn.utils import check_inputs, check_groups
label_desc: Use image node_id 5 for calling the AdversarialDebiasing obj's underlying member method code with example usage: obj.predict(X) and returns: self