class_docstr: Implementation of false positive rate parity as a moment.
  
  Adds conditioning on label `Y=0` compared to demographic parity, i.e.,
  
  .. math::
     P[h(X) = 1 | A = a, Y = 0] = P[h(X) = 1 | Y = 0] \; \forall a
  
  This implementation of :class:`UtilityParity` defines the event
  corresponding to `Y=0`.
  
  The `prob_event` :class:`pandas:pandas.DataFrame` will record the fraction
  of the samples corresponding to `Y = 0` in the `Y` array.
  
  The `index` MultiIndex will have a number of entries equal to the number
  of unique values of the sensitive feature, multiplied by the number of
  unique non-NaN values of the constructed `event` array, whose entries are
  either NaN or `label=0` (so only one unique non-NaN value), multiplied by
  two (for the Lagrange multipliers for positive and negative constraints).
  
  With these definitions, the :meth:`UtilityParity.signed_weights` method will calculate
  the costs for `Y=0` as they are calculated in Example 4 of
  :footcite:t:`agarwal2018reductions`,
  but will use the weights equal to zero for `Y=1`.
  
  This :class:`~Moment` also supports control features, which can be used to
  stratify the data, with the constraint applied within
  each stratum, but not between strata.
  
  Read more in the :ref:`User Guide <false_positive_rate_parity>`.
class_docstr_tok: ["Implementation","of","false","positive","rate","parity","as","a","moment",".","Adds","conditioning","on","label","`","Y=0","`","compared","to","demographic","parity",",","i.e.",",","..","math",":",":","P","[","h","(","X",")","=","1","|","A","=","a",",","Y","=","0","]","=","P","[","h","(","X",")","=","1","|","Y","=","0","]","\\",";","\\forall","a","This","implementation","of",":","class",":","`","UtilityParity","`","defines","the","event","corresponding","to","`","Y=0","`",".","The","`","prob_event","`",":","class",":","`","pandas",":","pandas.DataFrame","`","will","record","the","fraction","of","the","samples","corresponding","to","`","Y","=","0","`","in","the","`","Y","`","array",".","The","`","index","`","MultiIndex","will","have","a","number","of","entries","equal","to","the","number","of","unique","values","of","the","sensitive","feature",",","multiplied","by","the","number","of","unique","non-NaN","values","of","the","constructed","`","event","`","array",",","whose","entries","are","either","NaN","or","`","label=0","`","(","so","only","one","unique","non-NaN","value",")",",","multiplied","by","two","(","for","the","Lagrange","multipliers","for","positive","and","negative","constraints",")",".","With","these","definitions",",","the",":","meth",":","`","UtilityParity.signed_weights","`","method","will","calculate","the","costs","for","`","Y=0","`","as","they","are","calculated","in","Example","4","of",":","footcite",":","t",":","`","agarwal2018reductions","`",",","but","will","use","the","weights","equal","to","zero","for","`","Y=1","`",".","This",":","class",":","`","~Moment","`","also","supports","control","features",",","which","can","be","used","to","stratify","the","data",",","with","the","constraint","applied","within","each","stratum",",","but","not","between","strata",".","Read","more","in","the",":","ref",":","`","User","Guide","<","false_positive_rate_parity",">","`","."]
docstr: Load the specified data into the object.
docstr_tok: ["Load","the","specified","data","into","the","object","."]
code: def load_data(
      self, X, y, *, sensitive_features, control_features=None
  ):
      """Load the specified data into the object."""
      _, y_train, sf_train, cf_train = _validate_and_reformat_input(
          X,
          y,
          enforce_binary_labels=True,
          sensitive_features=sensitive_features,
          control_features=control_features,
      )
  
      # The `where` clause is used to put `pd.nan` on all values where `Y!=0`.
      base_event = y_train.apply(lambda v: _LABEL + "=" + str(v)).where(
          y_train == 0
      )
      event = _merge_event_and_control_columns(base_event, cf_train)
      super().load_data(
          X, y_train, event=event, sensitive_features=sf_train
      )
  
imports: import numpy
  import pandas
  from fairlearn.utils._input_validation import _MESSAGE_RATIO_NOT_IN_RANGE, _validate_and_reformat_input
  from .error_rate import ErrorRate
  from .moment import _ALL, _EVENT, _GROUP_ID, _LABEL, _SIGN, ClassificationMoment
label_desc: Use image node_id 1 for calling the FalsePositiveRateParity obj's underlying member method code with example usage: obj.load_data(X, y) without return types