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: Set strategy of a regressor object.
docstr_tok: ["Set","strategy","of","a","regressor","object","."]
code: def __set_regressor(self, strategy):
      """Set strategy of a regressor object."""
      self.__strategy = strategy
  
      if strategy == "RandomForest":
          self.__regressor = RandomForestRegressor(
              n_estimators=400,
              max_depth=10,
              max_features="sqrt",
              bootstrap=True,
              n_jobs=-1,
              random_state=0,
          )
  
      elif strategy == "LightGBM":
          self.__regressor = LGBMRegressor(
              n_estimators=500,
              learning_rate=0.05,
              colsample_bytree=0.8,
              subsample=0.9,
              nthread=-1,
              seed=0,
          )
  
      elif strategy == "ExtraTrees":
          self.__regressor = ExtraTreesRegressor(
              n_estimators=400,
              max_depth=10,
              max_features="sqrt",
              bootstrap=True,
              n_jobs=-1,
              random_state=0,
          )
  
      elif strategy == "Tree":
          self.__regressor = DecisionTreeRegressor(
              criterion="mse",
              splitter="best",
              max_depth=None,
              min_samples_split=2,
              min_samples_leaf=1,
              min_weight_fraction_leaf=0.0,
              max_features=None,
              random_state=0,
              max_leaf_nodes=None,
              presort=False,
          )
  
      elif strategy == "Bagging":
          self.__regressor = BaggingRegressor(
              base_estimator=None,
              n_estimators=500,
              max_samples=0.9,
              max_features=0.85,
              bootstrap=False,
              bootstrap_features=False,
              n_jobs=-1,
              random_state=0,
          )
  
      elif strategy == "AdaBoost":
          self.__regressor = AdaBoostRegressor(
              base_estimator=None,
              n_estimators=400,
              learning_rate=0.05,
              random_state=0,
          )
  
      elif strategy == "Linear":
          self.__regressor = Ridge(
              alpha=1.0,
              fit_intercept=True,
              normalize=False,
              copy_X=True,
              max_iter=None,
              tol=0.001,
              solver="auto",
              random_state=0,
          )
  
      else:
          raise ValueError(
              "Strategy invalid. Please choose between 'LightGBM'"
              ", 'RandomForest', 'ExtraTrees', "
              "'Tree', 'Bagging', 'AdaBoost' or 'Linear'"
          )
  
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 4 for calling the Regressor obj's underlying member method code with example usage: obj.__set_regressor(strategy) without return types