class_docstr: Class for computing metrics based on a single
  :obj:`~aif360.datasets.BinaryLabelDataset`.
class_docstr_tok: ["Class","for","computing","metrics","based","on","a","single",":","obj",":","`","~aif360.datasets.BinaryLabelDataset","`","."]
docstr: Compute the base rate, :math:`Pr(Y = 1) = P/(P+N)`, optionally
  conditioned on protected attributes.
  
  Args:
      privileged (bool, optional): Boolean prescribing whether to
          condition this metric on the `privileged_groups`, if `True`, or
          the `unprivileged_groups`, if `False`. Defaults to `None`
          meaning this metric is computed over the entire dataset.
  Returns:
      float: Base rate (optionally conditioned).
docstr_tok: ["Compute","the","base","rate",",",":","math",":","`","Pr","(","Y","=","1",")","=","P\/","(","P+N",")","`",",","optionally","conditioned","on","protected","attributes",".","Args",":","privileged","(","bool",",","optional",")",":","Boolean","prescribing","whether","to","condition","this","metric","on","the","`","privileged_groups","`",",","if","`","True","`",",","or","the","`","unprivileged_groups","`",",","if","`","False","`",".","Defaults","to","`","None","`","meaning","this","metric","is","computed","over","the","entire","dataset",".","Returns",":","float",":","Base","rate","(","optionally","conditioned",")","."]
code: def base_rate(self, privileged=None):
      """Compute the base rate, :math:`Pr(Y = 1) = P/(P+N)`, optionally
      conditioned on protected attributes.
  
      Args:
          privileged (bool, optional): Boolean prescribing whether to
              condition this metric on the `privileged_groups`, if `True`, or
              the `unprivileged_groups`, if `False`. Defaults to `None`
              meaning this metric is computed over the entire dataset.
      Returns:
          float: Base rate (optionally conditioned).
      """
      return self.num_positives(
          privileged=privileged
      ) / self.num_instances(privileged=privileged)
  
imports: import numpy
  from sklearn.neighbors import NearestNeighbors
  from aif360.algorithms.inprocessing.gerryfair.auditor import Auditor
  from aif360.datasets import BinaryLabelDataset
  from aif360.datasets.multiclass_label_dataset import MulticlassLabelDataset
  from aif360.metrics import DatasetMetric, utils
  from aif360.algorithms.inprocessing.gerryfair.clean import *
label_desc: Use image node_id 4 for calling the BinaryLabelDatasetMetric obj's underlying member method code with example usage: obj.base_rate(privileged) and returns: unknown