class_docstr: A base class for dimension reduction regression methods.
class_docstr_tok: ["A","base","class","for","dimension","reduction","regression","methods","."]
code: def _prep(self, n_slice):
      # Sort the data by endog
      ii = np.argsort(self.endog)
      x = self.exog[ii, :]
  
      # Whiten the data
      x -= x.mean(0)
      covx = np.dot(x.T, x) / x.shape[0]
      covxr = np.linalg.cholesky(covx)
      x = np.linalg.solve(covxr, x.T).T
      self.wexog = x
      self._covxr = covxr
  
      # Split the data into slices
      self._split_wexog = np.array_split(x, n_slice)
  
imports: import warnings
  import numpy
  import pandas
  from statsmodels.base import model
  import statsmodels.base.wrapper
  from statsmodels.tools.sm_exceptions import ConvergenceWarning
label_desc: Use image node_id 2 for calling the _DimReductionRegression obj's underlying member method code with example usage: obj._prep(n_slice) without return types