class_docstr: Wrap scikitlearn regressors.
  
  Parameters
  ----------
  strategy : str, default = "LightGBM"
      The choice for the regressor.
      Available strategies = {"LightGBM", "RandomForest", "ExtraTrees",
      "Tree", "Bagging", "AdaBoost" or "Linear"}
  
  **params : default = None
      Parameters of the corresponding regressor.
      Examples : n_estimators, max_depth...
class_docstr_tok: ["Wrap","scikitlearn","regressors",".","Parameters","--","--","--","--","--","strategy",":","str",",","default","=","``","LightGBM","''","The","choice","for","the","regressor",".","Available","strategies","=","{","``","LightGBM","''",",","``","RandomForest","''",",","``","ExtraTrees","''",",","``","Tree","''",",","``","Bagging","''",",","``","AdaBoost","''","or","``","Linear","''","}","*","*","params",":","default","=","None","Parameters","of","the","corresponding","regressor",".","Examples",":","n_estimators",",","max_depth","..."]
docstr: Transform dataframe df.
  
  Parameters
  ----------
  df : pandas dataframe of shape = (n, n_features)
      The dataset with numerical features.
  
  Returns
  -------
  pandas dataframe of shape = (n, n_selected_features)
      The transformed dataset with its most important features.
docstr_tok: ["Transform","dataframe","df",".","Parameters","--","--","--","--","--","df",":","pandas","dataframe","of","shape","=","(","n",",","n_features",")","The","dataset","with","numerical","features",".","Returns","--","--","--","-","pandas","dataframe","of","shape","=","(","n",",","n_selected_features",")","The","transformed","dataset","with","its","most","important","features","."]
code: def transform(self, df):
      """Transform dataframe df.
  
      Parameters
      ----------
      df : pandas dataframe of shape = (n, n_features)
          The dataset with numerical features.
  
      Returns
      -------
      pandas dataframe of shape = (n, n_selected_features)
          The transformed dataset with its most important features.
  
      """
      try:
          if not callable(getattr(self.__regressor, "transform")):
              raise ValueError("transform attribute is not callable")
      except Exception as e:
          raise e
  
      if self.__fitOK:
          # sanity checks
          if (type(df) != pd.SparseDataFrame) & (
              type(df) != pd.DataFrame
          ):
              raise ValueError("df must be a DataFrame")
  
          return self.__regressor.transform(df.values)
      else:
          raise ValueError("You must call the fit function before !")
  
file_path: MLBox/mlbox/model/regression/regressor.py
imports: import warnings
  from copy import copy
  import numpy
  import pandas
  from sklearn.ensemble import AdaBoostRegressor, BaggingRegressor, ExtraTreesRegressor, RandomForestRegressor
  from sklearn.linear_model import Ridge
  from sklearn.tree import DecisionTreeRegressor
  from lightgbm import LGBMRegressor
label_desc: Use image node_id 8 for calling the Regressor obj's underlying member method code with example usage: obj.transform(df) and returns: self