class_docstr: Hyperparamater searching and optimization on a given validation set
  for LGBModel or XGBModel. 
  
  Pass a LGBModel or XGBModel, and a dictionary with the parameter boundaries 
  for grid, random or bayesian search. 
  To operate random search pass distributions in the param_grid with rvs 
  method for sampling (such as those from scipy.stats.distributions). 
  To operate bayesian search pass hyperopt distributions.   
  The specification of n_iter or sampling_seed is effective only with random
  or hyperopt searches.
  The best parameter combination is the one which obtain the better score
  (as returned by eval_metric) on the provided eval_set.
  
  If all parameters are presented as a list/floats/integers, grid-search 
  is performed. If at least one parameter is given as a distribution (such as 
  those from scipy.stats.distributions), random-search is performed computing
  sampling with replacement. Bayesian search is effective only when all the 
  parameters to tune are in form of hyperopt distributions. 
  It is highly recommended to use continuous distributions for continuous 
  parameters.
  
  Parameters
  ----------
  estimator : object
      A supervised learning estimator of LGBModel or XGBModel type.
  
  param_grid : dict
      Dictionary with parameters names (`str`) as keys and distributions
      or lists of parameters to try. 
  
  greater_is_better : bool, default=False
      Whether the quantity to monitor is a score function, 
      meaning high is good, or a loss function, meaning low is good.
  
  n_iter : int, default=None
      Effective only for random or hyperopt search.
      Number of parameter settings that are sampled. 
      n_iter trades off runtime vs quality of the solution.
  
  sampling_seed : int, default=None
      Effective only for random or hyperopt search.
      The seed used to sample from the hyperparameter distributions.
  
  n_jobs : int, default=None
      Effective only with grid and random search.
      The number of jobs to run in parallel for model fitting.
      ``None`` means 1 using one processor. ``-1`` means using all
      processors.
  
  verbose : int, default=1
      Verbosity mode. <=0 silent all; >0 print trial logs with the 
      connected score.
  
  Attributes
  ----------
  estimator_ : estimator
      Estimator that was chosen by the search, i.e. estimator
      which gave the best score on the eval_set.
  
  best_params_ : dict
      Parameter setting that gave the best results on the eval_set.
  
  trials_ : list
      A list of dicts. The dicts are all the parameter combinations tried 
      and derived from the param_grid.
  
  best_score_ : float
      The best score achieved by all the possible combination created.
  
  scores_ : list
      The scores achieved on the eval_set by all the models tried.
  
  best_iter_ : int
      The boosting iterations achieved by the best parameters combination.
  
  iterations_ : list
      The boosting iterations of all the models tried.
  
  boost_type_ : str
      The type of the boosting estimator (LGB or XGB).
class_docstr_tok: ["Hyperparamater","searching","and","optimization","on","a","given","validation","set","for","LGBModel","or","XGBModel",".","Pass","a","LGBModel","or","XGBModel",",","and","a","dictionary","with","the","parameter","boundaries","for","grid",",","random","or","bayesian","search",".","To","operate","random","search","pass","distributions","in","the","param_grid","with","rvs","method","for","sampling","(","such","as","those","from","scipy.stats.distributions",")",".","To","operate","bayesian","search","pass","hyperopt","distributions",".","The","specification","of","n_iter","or","sampling_seed","is","effective","only","with","random","or","hyperopt","searches",".","The","best","parameter","combination","is","the","one","which","obtain","the","better","score","(","as","returned","by","eval_metric",")","on","the","provided","eval_set",".","If","all","parameters","are","presented","as","a","list\/floats\/integers",",","grid-search","is","performed",".","If","at","least","one","parameter","is","given","as","a","distribution","(","such","as","those","from","scipy.stats.distributions",")",",","random-search","is","performed","computing","sampling","with","replacement",".","Bayesian","search","is","effective","only","when","all","the","parameters","to","tune","are","in","form","of","hyperopt","distributions",".","It","is","highly","recommended","to","use","continuous","distributions","for","continuous","parameters",".","Parameters","--","--","--","--","--","estimator",":","object","A","supervised","learning","estimator","of","LGBModel","or","XGBModel","type",".","param_grid",":","dict","Dictionary","with","parameters","names","(","`","str","`",")","as","keys","and","distributions","or","lists","of","parameters","to","try",".","greater_is_better",":","bool",",","default=False","Whether","the","quantity","to","monitor","is","a","score","function",",","meaning","high","is","good",",","or","a","loss","function",",","meaning","low","is","good",".","n_iter",":","int",",","default=None","Effective","only","for","random","or","hyperopt","search",".","Number","of","parameter","settings","that","are","sampled",".","n_iter","trades","off","runtime","vs","quality","of","the","solution",".","sampling_seed",":","int",",","default=None","Effective","only","for","random","or","hyperopt","search",".","The","seed","used","to","sample","from","the","hyperparameter","distributions",".","n_jobs",":","int",",","default=None","Effective","only","with","grid","and","random","search",".","The","number","of","jobs","to","run","in","parallel","for","model","fitting",".","``","None","``","means","1","using","one","processor",".","``","-1","``","means","using","all","processors",".","verbose",":","int",",","default=1","Verbosity","mode",".","<","=0","silent","all",";",">","0","print","trial","logs","with","the","connected","score",".","Attributes","--","--","--","--","--","estimator_",":","estimator","Estimator","that","was","chosen","by","the","search",",","i.e",".","estimator","which","gave","the","best","score","on","the","eval_set",".","best_params_",":","dict","Parameter","setting","that","gave","the","best","results","on","the","eval_set",".","trials_",":","list","A","list","of","dicts",".","The","dicts","are","all","the","parameter","combinations","tried","and","derived","from","the","param_grid",".","best_score_",":","float","The","best","score","achieved","by","all","the","possible","combination","created",".","scores_",":","list","The","scores","achieved","on","the","eval_set","by","all","the","models","tried",".","best_iter_",":","int","The","boosting","iterations","achieved","by","the","best","parameters","combination",".","iterations_",":","list","The","boosting","iterations","of","all","the","models","tried",".","boost_type_",":","str","The","type","of","the","boosting","estimator","(","LGB","or","XGB",")","."]
docstr: Private method to build model.
docstr_tok: ["Private","method","to","build","model","."]
code: def _build_model(self, params):
      """Private method to build model."""
  
      model = clone(self.estimator)
      model.set_params(**params)
  
      return model
  
imports: from sklearn.base import clone
  from ._classes import _BoostSearch, _Boruta, _RFA, _RFE
label_desc: Use image node_id 2 for calling the BoostSearch obj's underlying member method code with example usage: obj._build_model(params) and returns: model