class_docstr: Dataset for LOFO
  Parameters
  ----------
  df: pandas dataframe
  target: string
      Column name for target within df
  features: list of strings
      List of column names within df
  feature_groups: dict, optional
      Name, value dictionary of feature groups as numpy.darray or scipy.csr.scr_matrix
  auto_group_threshold: float, optional
      Threshold for grouping correlated features together, must be between 0 and 1
docstr: Get feature matrix and fit_params after removing a feature
  Parameters
  ----------
  feature_to_remove : string
      feature name to remove
  fit_params : dict
      fit parameters for the model
  Returns
  -------
  X : numpy.darray or scipy.csr.scr_matrix
      Feature matrix
  fit_params: dict
      Updated fit_params after feature removal
docstr_tok: ["Get","feature","matrix","and","fit_params","after","removing","a","feature","Parameters","--","--","--","--","--","feature_to_remove",":","string","feature","name","to","remove","fit_params",":","dict","fit","parameters","for","the","model","Returns","--","--","--","-","X",":","numpy.darray","or","scipy.csr.scr_matrix","Feature","matrix","fit_params",":","dict","Updated","fit_params","after","feature","removal"]
code: def getX(self, feature_to_remove, fit_params):
      """Get feature matrix and fit_params after removing a feature
      Parameters
      ----------
      feature_to_remove : string
          feature name to remove
      fit_params : dict
          fit parameters for the model
      Returns
      -------
      X : numpy.darray or scipy.csr.scr_matrix
          Feature matrix
      fit_params: dict
          Updated fit_params after feature removal
      """
      feature_lists = [
          self.features[i]
          for i, feature_name in enumerate(self.feature_names)
          if feature_name != feature_to_remove
      ]
      feature_list = flatten_list(feature_lists)
      concat_list = [self.df[feature_list].values]
  
      for feature_name, feature_matrix in self.feature_groups.items():
          if feature_name != feature_to_remove:
              concat_list.append(feature_matrix)
  
      fit_params = fit_params.copy()
      if "categorical_feature" in fit_params:
          cat_features = [
              f
              for f in fit_params["categorical_feature"]
              if f != feature_to_remove
          ]
          fit_params["categorical_feature"] = [
              ix
              for ix, f in enumerate(feature_list)
              if (f in cat_features)
          ]
  
      has_sparse = False
      for feature_name, feature_matrix in self.feature_groups.items():
          if feature_name != feature_to_remove and isinstance(
              feature_matrix, ss.csr.csr_matrix
          ):
              has_sparse = True
  
      concat = np.hstack
      if has_sparse:
          concat = ss.hstack
  
      return concat(concat_list), fit_params
  
file_path: lofo-importance/lofo/dataset.py
imports: import itertools
  import numpy
  import scipy.sparse
  from scipy.stats import spearmanr
  from lofo.utils import flatten_list
  import networkx
label_desc: Use image node_id 3 for calling the Dataset obj's underlying member method code with example usage: obj.getX(feature_to_remove, fit_params) and returns: concat,  fit_params