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: Fits Regressor.
  
  Parameters
  ----------
  df_train : pandas dataframe of shape = (n_train, n_features)
      The train dataset with numerical features.
  
  y_train : pandas series of shape = (n_train, )
      The target for regression tasks.
  
  Returns
  -------
  object
      self
docstr_tok: ["Fits","Regressor",".","Parameters","--","--","--","--","--","df_train",":","pandas","dataframe","of","shape","=","(","n_train",",","n_features",")","The","train","dataset","with","numerical","features",".","y_train",":","pandas","series","of","shape","=","(","n_train",",",")","The","target","for","regression","tasks",".","Returns","--","--","--","-","object","self"]
code: def fit(self, df_train, y_train):
      """Fits Regressor.
  
      Parameters
      ----------
      df_train : pandas dataframe of shape = (n_train, n_features)
          The train dataset with numerical features.
  
      y_train : pandas series of shape = (n_train, )
          The target for regression tasks.
  
      Returns
      -------
      object
          self
  
      """
      # sanity checks
      if (type(df_train) != pd.SparseDataFrame) and (
          type(df_train) != pd.DataFrame
      ):
          raise ValueError("df_train must be a DataFrame")
  
      if type(y_train) != pd.core.series.Series:
          raise ValueError("y_train must be a Series")
  
      self.__regressor.fit(df_train.values, y_train)
      self.__col = df_train.columns
      self.__fitOK = True
  
      return self
  
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 5 for calling the Regressor obj's underlying member method code with example usage: obj.fit(df_train, y_train) and returns: self