class_docstr: Generic moment.
  
  Our implementations of the reductions approach to fairness
  :footcite:p:`agarwal2018reductions` make use
  of :class:`Moment` objects to describe both the optimization objective
  and the fairness constraints
  imposed on the solution. This is an abstract class for all such objects.
  
  Read more in the :ref:`User Guide <reductions>`.
class_docstr_tok: ["Generic","moment",".","Our","implementations","of","the","reductions","approach","to","fairness",":","footcite",":","p",":","`","agarwal2018reductions","`","make","use","of",":","class",":","`","Moment","`","objects","to","describe","both","the","optimization","objective","and","the","fairness","constraints","imposed","on","the","solution",".","This","is","an","abstract","class","for","all","such","objects",".","Read","more","in","the",":","ref",":","`","User","Guide","<","reductions",">","`","."]
docstr: Load a set of data for use by this object.
  
  Parameters
  ----------
  X : array
      The feature array
  y : :class:`pandas.Series`
      The label vector
  sensitive_features : :class:`pandas.Series`
      The sensitive feature vector (default None)
docstr_tok: ["Load","a","set","of","data","for","use","by","this","object",".","Parameters","--","--","--","--","--","X",":","array","The","feature","array","y",":",":","class",":","`","pandas.Series","`","The","label","vector","sensitive_features",":",":","class",":","`","pandas.Series","`","The","sensitive","feature","vector","(","default","None",")"]
code: def load_data(
      self, X, y: pd.Series, *, sensitive_features: pd.Series = None
  ):
      """Load a set of data for use by this object.
  
      Parameters
      ----------
      X : array
          The feature array
      y : :class:`pandas.Series`
          The label vector
      sensitive_features : :class:`pandas.Series`
          The sensitive feature vector (default None)
      """
      assert self.data_loaded is False, "data can be loaded only once"
      if sensitive_features is not None:
          assert isinstance(sensitive_features, pd.Series)
      self.X = X
      self._y = y
      self.tags = pd.DataFrame({_LABEL: y})
      if sensitive_features is not None:
          self.tags[_GROUP_ID] = sensitive_features
      self.data_loaded = True
      self._gamma_descr = None
  
file_path: fairlearn/fairlearn/reductions/_moments/moment.py
imports: import pandas
label_desc: Use image node_id 2 for calling the Moment obj's underlying member method code with example usage: obj.load_data(X, y) without return types