class_docstr: Reject option classification is a postprocessing technique that gives
  favorable outcomes to unpriviliged groups and unfavorable outcomes to
  priviliged groups in a confidence band around the decision boundary with the
  highest uncertainty [10]_.
  
  References:
      .. [10] F. Kamiran, A. Karim, and X. Zhang, "Decision Theory for
         Discrimination-Aware Classification," IEEE International Conference
         on Data Mining, 2012.
class_docstr_tok: ["Reject","option","classification","is","a","postprocessing","technique","that","gives","favorable","outcomes","to","unpriviliged","groups","and","unfavorable","outcomes","to","priviliged","groups","in","a","confidence","band","around","the","decision","boundary","with","the","highest","uncertainty","[","10","]","_.","References",":","..","[","10","]","F.","Kamiran",",","A.","Karim",",","and","X.","Zhang",",","``","Decision","Theory","for","Discrimination-Aware","Classification",",","''","IEEE","International","Conference","on","Data","Mining",",","2012","."]
docstr: Args:
      unprivileged_groups (dict or list(dict)): Representation for
          unprivileged group.
      privileged_groups (dict or list(dict)): Representation for
          privileged group.
      low_class_thresh (float): Smallest classification threshold to use
          in the optimization. Should be between 0. and 1.
      high_class_thresh (float): Highest classification threshold to use
          in the optimization. Should be between 0. and 1.
      num_class_thresh (int): Number of classification thresholds between
          low_class_thresh and high_class_thresh for the optimization
          search. Should be > 0.
      num_ROC_margin (int): Number of relevant ROC margins to be used in
          the optimization search. Should be > 0.
      metric_name (str): Name of the metric to use for the optimization.
          Allowed options are "Statistical parity difference",
          "Average odds difference", "Equal opportunity difference".
      metric_ub (float): Upper bound of constraint on the metric value
      metric_lb (float): Lower bound of constraint on the metric value
docstr_tok: ["Args",":","unprivileged_groups","(","dict","or","list","(","dict",")",")",":","Representation","for","unprivileged","group",".","privileged_groups","(","dict","or","list","(","dict",")",")",":","Representation","for","privileged","group",".","low_class_thresh","(","float",")",":","Smallest","classification","threshold","to","use","in","the","optimization",".","Should","be","between","0.","and","1.","high_class_thresh","(","float",")",":","Highest","classification","threshold","to","use","in","the","optimization",".","Should","be","between","0.","and","1.","num_class_thresh","(","int",")",":","Number","of","classification","thresholds","between","low_class_thresh","and","high_class_thresh","for","the","optimization","search",".","Should","be",">","0.","num_ROC_margin","(","int",")",":","Number","of","relevant","ROC","margins","to","be","used","in","the","optimization","search",".","Should","be",">","0.","metric_name","(","str",")",":","Name","of","the","metric","to","use","for","the","optimization",".","Allowed","options","are","``","Statistical","parity","difference","''",",","``","Average","odds","difference","''",",","``","Equal","opportunity","difference","''",".","metric_ub","(","float",")",":","Upper","bound","of","constraint","on","the","metric","value","metric_lb","(","float",")",":","Lower","bound","of","constraint","on","the","metric","value"]
code: def __init__(
      self,
      unprivileged_groups,
      privileged_groups,
      low_class_thresh=0.01,
      high_class_thresh=0.99,
      num_class_thresh=100,
      num_ROC_margin=50,
      metric_name="Statistical parity difference",
      metric_ub=0.05,
      metric_lb=-0.05,
  ):
      """
      Args:
          unprivileged_groups (dict or list(dict)): Representation for
              unprivileged group.
          privileged_groups (dict or list(dict)): Representation for
              privileged group.
          low_class_thresh (float): Smallest classification threshold to use
              in the optimization. Should be between 0. and 1.
          high_class_thresh (float): Highest classification threshold to use
              in the optimization. Should be between 0. and 1.
          num_class_thresh (int): Number of classification thresholds between
              low_class_thresh and high_class_thresh for the optimization
              search. Should be > 0.
          num_ROC_margin (int): Number of relevant ROC margins to be used in
              the optimization search. Should be > 0.
          metric_name (str): Name of the metric to use for the optimization.
              Allowed options are "Statistical parity difference",
              "Average odds difference", "Equal opportunity difference".
          metric_ub (float): Upper bound of constraint on the metric value
          metric_lb (float): Lower bound of constraint on the metric value
      """
      super(RejectOptionClassification, self).__init__(
          unprivileged_groups=unprivileged_groups,
          privileged_groups=privileged_groups,
          low_class_thresh=low_class_thresh,
          high_class_thresh=high_class_thresh,
          num_class_thresh=num_class_thresh,
          num_ROC_margin=num_ROC_margin,
          metric_name=metric_name,
      )
  
      allowed_metrics = [
          "Statistical parity difference",
          "Average odds difference",
          "Equal opportunity difference",
      ]
  
      self.unprivileged_groups = unprivileged_groups
      self.privileged_groups = privileged_groups
  
      self.low_class_thresh = low_class_thresh
      self.high_class_thresh = high_class_thresh
      self.num_class_thresh = num_class_thresh
      self.num_ROC_margin = num_ROC_margin
      self.metric_name = metric_name
      self.metric_ub = metric_ub
      self.metric_lb = metric_lb
  
      self.classification_threshold = None
      self.ROC_margin = None
  
      if (
          (self.low_class_thresh < 0.0)
          or (self.low_class_thresh > 1.0)
          or (self.high_class_thresh < 0.0)
          or (self.high_class_thresh > 1.0)
          or (self.low_class_thresh >= self.high_class_thresh)
          or (self.num_class_thresh < 1)
          or (self.num_ROC_margin < 1)
      ):
          raise ValueError("Input parameter values out of bounds")
  
      if metric_name not in allowed_metrics:
          raise ValueError(
              "metric name not in the list of allowed metrics"
          )
  
file_path: AIF360/aif360/algorithms/postprocessing/reject_option_classification.py
imports: import numpy
  from warnings import warn
  from aif360.algorithms import Transformer
  from aif360.metrics import utils
  from aif360.metrics import BinaryLabelDatasetMetric, ClassificationMetric
label_desc: Use image node_id 1 to create a new RejectOptionClassification object from inherited base classes: Transformer with example: obj = RejectOptionClassification(unprivileged_groups, privileged_groups, low_class_thresh, high_class_thresh, num_class_thresh, num_ROC_margin, metric_name, metric_ub, metric_lb)