class_docstr: Misclassification error as a moment.
  
  A classifier :math:`h(X)` has the misclassification error equal to
  
  .. math::
    P[h(X) \ne Y]
  
  It is also possible to specify costs for false positives and false
  negatives. The error then evaluates to
  
  .. math::
    c_{FP} P[h(X)=1, Y=0] + c_{FN} P[h(X)=0, Y=1]
  
  where :math:`c_{FP}` and :math:`c_{FN}` are the costs of false positive
  and false negative errors respectively. The standard misclassification
  error corresponds to :math:`c_{FP}=c_{FN}=1.0`.
  
  Parameters
  ----------
  costs : dict
      The dictionary with keys :code:`'fp'` and :code:`'fn'` containing the
      costs of false positives and false negatives. If none are provided
      costs of 1.0 are assumed.
class_docstr_tok: ["Misclassification","error","as","a","moment",".","A","classifier",":","math",":","`","h","(","X",")","`","has","the","misclassification","error","equal","to","..","math",":",":","P","[","h","(","X",")","\\ne","Y","]","It","is","also","possible","to","specify","costs","for","false","positives","and","false","negatives",".","The","error","then","evaluates","to","..","math",":",":","c_","{","FP","}","P","[","h","(","X",")","=1",",","Y=0","]","+","c_","{","FN","}","P","[","h","(","X",")","=0",",","Y=1","]","where",":","math",":","`","c_","{","FP","}","`","and",":","math",":","`","c_","{","FN","}","`","are","the","costs","of","false","positive","and","false","negative","errors","respectively",".","The","standard","misclassification","error","corresponds","to",":","math",":","`","c_","{","FP","}","=c_","{","FN","}","=1.0","`",".","Parameters","--","--","--","--","--","costs",":","dict","The","dictionary","with","keys",":","code",":","`","'fp","'","`","and",":","code",":","`","'fn","'","`","containing","the","costs","of","false","positives","and","false","negatives",".","If","none","are","provided","costs","of","1.0","are","assumed","."]
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, _ = _validate_and_reformat_input(
          X,
          y,
          enforce_binary_labels=True,
          sensitive_features=sensitive_features,
          control_features=control_features,
      )
      # The following uses X  so that the estimators get X untouched
      super().load_data(X, y_train, sensitive_features=sf_train)
      self.index = [_ALL]
  
file_path: fairlearn/fairlearn/reductions/_moments/error_rate.py
imports: import numpy
  import pandas
  from fairlearn.utils._input_validation import _validate_and_reformat_input
  from .moment import _ALL, _LABEL, ClassificationMoment
label_desc: Use image node_id 2 for calling the ErrorRate obj's underlying member method code with example usage: obj.load_data(X, y) without return types