class_docstr: A component that filters out sensitive correlations in a dataset.
  
  CorrelationRemover applies a linear transformation to the non-sensitive feature columns
  in order to remove their correlation with the sensitive feature columns while retaining
  as much information as possible (as measured by the least-squares error).
  
  Read more in the :ref:`User Guide <preprocessing>`.
  
  Parameters
  ----------
      sensitive_feature_ids : list
          list of columns to filter out this can be a sequence of
          either int ,in the case of numpy, or string, in the case of pandas.
      alpha : float
          parameter to control how much to filter, for alpha=1.0 we filter out
          all information while for alpha=0.0 we don't apply any.
  
  Notes
  -----
  This method will change the original dataset by removing all correlation with sensitive
  values. To describe that mathematically, let's assume in the original dataset :math:`X`
  we've got a set of sensitive attributes :math:`S` and a set of non-sensitive attributes
  :math:`Z`. Mathematically this method will be solving the following problem.
  
  .. math::
  
      \min _{\mathbf{z}_{1}, \ldots, \mathbf{z}_{n}} \sum_{i=1}^{n}\left\|\mathbf{z}_{i}
      -\mathbf{x}_{i}\right\|^{2} \\
      \text{subject to} \\
      \frac{1}{n} \sum_{i=1}^{n} \mathbf{z}_{i}\left(\mathbf{s}_{i}-\overline{\mathbf{s}}
      \right)^{T}=\mathbf{0}
  
  
  The solution to this problem is found by centering sensitive features, fitting a
  linear regression model to the non-sensitive features and reporting the residual.
  
  The columns in :math:`S` will be dropped but the hyper parameter :math:`\alpha`
  does allow you to tweak the amount of filtering that gets applied.
  
  .. math::
  
      X_{\text{tfm}} = \alpha X_{\text{filtered}} + (1-\alpha) X_{\text{orig}}
  
  Note that the lack of correlation does not imply anything about statistical dependence.
  Therefore, we expect this to be most appropriate as a preprocessing step for
  (generalized) linear models.
  
  .. versionadded:: 0.6
docstr: Transform X by applying the correlation remover.
docstr_tok: ["Transform","X","by","applying","the","correlation","remover","."]
code: def transform(self, X):
      """Transform X by applying the correlation remover."""
      X = check_array(X, estimator=self)
      check_is_fitted(
          self, ["beta_", "X_shape_", "lookup_", "sensitive_mean_"]
      )
      if self.X_shape_[1] != X.shape[1]:
          raise ValueError(
              f"The trained data has {self.X_shape_[1]} features while this dataset"
              f" has {X.shape[1]}."
          )
      X_use, X_sensitive = self._split_X(X)
      X_s_center = X_sensitive - self.sensitive_mean_
      X_filtered = X_use - X_s_center.dot(self.beta_)
      X_use = np.atleast_2d(X_use)
      X_filtered = np.atleast_2d(X_filtered)
      return self.alpha * X_filtered + (1 - self.alpha) * X_use
  
file_path: fairlearn/fairlearn/preprocessing/_correlation_remover.py
imports: import numpy
  import pandas
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
label_desc: Use image node_id 5 for calling the CorrelationRemover obj's underlying member method code with example usage: obj.transform(X) and returns: unknown