class_docstr: Prejudice remover is an in-processing technique that adds a
  discrimination-aware regularization term to the learning objective [6]_.
  
  References:
      .. [6] T. Kamishima, S. Akaho, H. Asoh, and J. Sakuma, "Fairness-Aware
         Classifier with Prejudice Remover Regularizer," Joint European
         Conference on Machine Learning and Knowledge Discovery in Databases,
         2012.
class_docstr_tok: ["Prejudice","remover","is","an","in-processing","technique","that","adds","a","discrimination-aware","regularization","term","to","the","learning","objective","[","6","]","_.","References",":","..","[","6","]","T.","Kamishima",",","S.","Akaho",",","H.","Asoh",",","and","J.","Sakuma",",","``","Fairness-Aware","Classifier","with","Prejudice","Remover","Regularizer",",","''","Joint","European","Conference","on","Machine","Learning","and","Knowledge","Discovery","in","Databases",",","2012","."]
docstr: Learns the regularized logistic regression model.
  
  Args:
      dataset (BinaryLabelDataset): Dataset containing true labels.
  
  Returns:
      PrejudiceRemover: Returns self.
docstr_tok: ["Learns","the","regularized","logistic","regression","model",".","Args",":","dataset","(","BinaryLabelDataset",")",":","Dataset","containing","true","labels",".","Returns",":","PrejudiceRemover",":","Returns","self","."]
code: def fit(self, dataset):
      """Learns the regularized logistic regression model.
  
      Args:
          dataset (BinaryLabelDataset): Dataset containing true labels.
  
      Returns:
          PrejudiceRemover: Returns self.
      """
      data = np.column_stack([dataset.features, dataset.labels])
      columns = dataset.feature_names + dataset.label_names
      train_df = pd.DataFrame(data=data, columns=columns)
  
      all_sensitive_attributes = dataset.protected_attribute_names
  
      if not self.sensitive_attr:
          self.sensitive_attr = all_sensitive_attributes[0]
      self.sensitive_ind = all_sensitive_attributes.index(
          self.sensitive_attr
      )
  
      sens_df = pd.Series(
          dataset.protected_attributes[:, self.sensitive_ind],
          name=self.sensitive_attr,
      )
  
      if not self.class_attr:
          self.class_attr = dataset.label_names[0]
  
      fd, model_name = tempfile.mkstemp()
      os.close(fd)
      train_name = self._create_file_in_kamishima_format(
          train_df,
          self.class_attr,
          dataset.favorable_label,
          all_sensitive_attributes,
          sens_df,
          dataset.privileged_protected_attributes[self.sensitive_ind],
      )
      # ADDED FOLLOWING LINE to get absolute path of this file, i.e.
      # prejudice_remover.py
      k_path = os.path.dirname(os.path.abspath(__file__))
      train_pr = os.path.join(
          k_path, "kamfadm-2012ecmlpkdd", "train_pr.py"
      )
      # changed paths in the calls below to (a) specify path of train_pr,
      # predict_lr RELATIVE to this file, and (b) compute & use absolute path
      #  and (c) replace python3 with python
      subprocess.call(
          [
              "python",
              train_pr,
              "-e",
              str(self.eta),
              "-i",
              train_name,
              "-o",
              model_name,
              "--quiet",
          ]
      )
      os.unlink(train_name)
  
      self.model_name = model_name
  
      return self
  
file_path: AIF360/aif360/algorithms/inprocessing/prejudice_remover.py
imports: import numpy
  import pandas
  import tempfile
  import os
  import subprocess
  from aif360.algorithms import Transformer
label_desc: Use image node_id 3 for calling the PrejudiceRemover obj's underlying member method code with example usage: obj.fit(dataset) and returns: self