class_docstr: Hyper-parameter search with hyperopt.
  
  Parameters
  ----------
  
  estimator : estimator object
      An object of that type is instantiated for each set of candidate parameters.
      This is assumed to implement the ``scikit-learn`` estimator interface. The
      estimator needs to provide a ``score`` method or ``scoring`` must be passed.
  
  space : hyperopt.pyll.Apply node or "annotated"
      The set of possible arguments to `fn` is the set of objects
      that could be created with non-zero probability by drawing randomly
      from this stochastic program involving involving hp_<xxx> nodes
      (see `hyperopt.hp` and `hyperopt.pyll_utils`).
      If set to "annotated", will read space using type hint in fn. Ex:
      (`def fn(x: hp.uniform("x", -1, 1)): return x`)
  
  max_evals : int
      Allow up to this many function evaluations before returning.
  
  trials : None or base.Trials (or subclass)
      Storage for completed, ongoing, and scheduled evaluation points.  If
      None, then a temporary `base.Trials` instance will be created.  If
      a trials object, then that trials object will be affected by
      side-effect of this call.
  
  algo : search algorithm
      This object, such as `hyperopt.rand.suggest` and
      `hyperopt.tpe.suggest` provides logic for sequential search of the
      hyperparameter space.
  
  warm_start : bool, optional (default False)
      When set to True, reuse the solution of the previous ``fit`` call and add
      iterations to the trials object. Otherwise, reset the ``trials``. ``max_evals``
      refers to the total number of iterations in the ``Trials`` object, so use ``set_params``
      to increase the total number.
  
  scoring : str or callable, optional (default None)
      Strategy to evaluate the performance of the cross-validated model on the test set.
  
  n_jobs : int, optional (default None)
      Number of jobs to run in parallel. ``None`` means 1 unless in a :obj:`joblib.parallel_backend`
      context. ``-1`` means using all processors.
  
  refit : bool, optional (default True)
      Refit an estimator using the best found parameters on the whole dataset.
  
  cv : int, cross-validation generator or an iterable, optional (default None)
      Determines the cross-validation splitting strategy.
  
  verbose : int, optional (default 0)
      Controls the verbosity.
  
  pre_dispatch : int or str, optional (default "2*n_jobs")
      Controls the number of jobs that get dispatched during parallel execution. Reducing this
      number can be useful to avoid high memory usage.
  
  random_state : int, RandomState instance or None, optional (default None)
      Pseudo random number generator state used for random uniform sampling from lists
      instead of ``scipy.stats`` distributions.
  
  error_score : 'raise' or numeric, optional (default np.nan)
      Value to assign to the score if an error occurs during fitting.
  
  return_train_score : bool, optional (default False)
      If ``False``, the ``cv_results_`` attribute will not include training scores.
  
  Attributes
  ----------
  trials_ : Trials
      The trials object.
class_docstr_tok: ["Hyper-parameter","search","with","hyperopt",".","Parameters","--","--","--","--","--","estimator",":","estimator","object","An","object","of","that","type","is","instantiated","for","each","set","of","candidate","parameters",".","This","is","assumed","to","implement","the","``","scikit-learn","``","estimator","interface",".","The","estimator","needs","to","provide","a","``","score","``","method","or","``","scoring","``","must","be","passed",".","space",":","hyperopt.pyll.Apply","node","or","``","annotated","''","The","set","of","possible","arguments","to","`","fn","`","is","the","set","of","objects","that","could","be","created","with","non-zero","probability","by","drawing","randomly","from","this","stochastic","program","involving","involving","hp_","<","xxx",">","nodes","(","see","`","hyperopt.hp","`","and","`","hyperopt.pyll_utils","`",")",".","If","set","to","``","annotated","''",",","will","read","space","using","type","hint","in","fn",".","Ex",":","(","`","def","fn","(","x",":","hp.uniform","(","``","x","''",",","-1",",","1",")",")",":","return","x","`",")","max_evals",":","int","Allow","up","to","this","many","function","evaluations","before","returning",".","trials",":","None","or","base.Trials","(","or","subclass",")","Storage","for","completed",",","ongoing",",","and","scheduled","evaluation","points",".","If","None",",","then","a","temporary","`","base.Trials","`","instance","will","be","created",".","If","a","trials","object",",","then","that","trials","object","will","be","affected","by","side-effect","of","this","call",".","algo",":","search","algorithm","This","object",",","such","as","`","hyperopt.rand.suggest","`","and","`","hyperopt.tpe.suggest","`","provides","logic","for","sequential","search","of","the","hyperparameter","space",".","warm_start",":","bool",",","optional","(","default","False",")","When","set","to","True",",","reuse","the","solution","of","the","previous","``","fit","``","call","and","add","iterations","to","the","trials","object",".","Otherwise",",","reset","the","``","trials","``",".","``","max_evals","``","refers","to","the","total","number","of","iterations","in","the","``","Trials","``","object",",","so","use","``","set_params","``","to","increase","the","total","number",".","scoring",":","str","or","callable",",","optional","(","default","None",")","Strategy","to","evaluate","the","performance","of","the","cross-validated","model","on","the","test","set",".","n_jobs",":","int",",","optional","(","default","None",")","Number","of","jobs","to","run","in","parallel",".","``","None","``","means","1","unless","in","a",":","obj",":","`","joblib.parallel_backend","`","context",".","``","-1","``","means","using","all","processors",".","refit",":","bool",",","optional","(","default","True",")","Refit","an","estimator","using","the","best","found","parameters","on","the","whole","dataset",".","cv",":","int",",","cross-validation","generator","or","an","iterable",",","optional","(","default","None",")","Determines","the","cross-validation","splitting","strategy",".","verbose",":","int",",","optional","(","default","0",")","Controls","the","verbosity",".","pre_dispatch",":","int","or","str",",","optional","(","default","``","2","*","n_jobs","''",")","Controls","the","number","of","jobs","that","get","dispatched","during","parallel","execution",".","Reducing","this","number","can","be","useful","to","avoid","high","memory","usage",".","random_state",":","int",",","RandomState","instance","or","None",",","optional","(","default","None",")","Pseudo","random","number","generator","state","used","for","random","uniform","sampling","from","lists","instead","of","``","scipy.stats","``","distributions",".","error_score",":","'raise","'","or","numeric",",","optional","(","default","np.nan",")","Value","to","assign","to","the","score","if","an","error","occurs","during","fitting",".","return_train_score",":","bool",",","optional","(","default","False",")","If","``","False","``",",","the","``","cv_results_","``","attribute","will","not","include","training","scores",".","Attributes","--","--","--","--","--","trials_",":","Trials","The","trials","object","."]
docstr: Init method.
docstr_tok: ["Init","method","."]
code: def __init__(
      self,
      estimator,
      space,
      max_evals,
      trials=None,
      algo=None,
      warm_start=False,
      scoring=None,
      n_jobs=None,
      refit=True,
      cv=None,
      verbose=0,
      pre_dispatch="2*n_jobs",
      random_state=None,
      error_score=np.nan,
      return_train_score=False,
  ):
      """Init method."""
      super().__init__(
          estimator=estimator,
          scoring=scoring,
          n_jobs=n_jobs,
          refit=refit,
          cv=cv,
          verbose=verbose,
          pre_dispatch=pre_dispatch,
          error_score=error_score,
          return_train_score=return_train_score,
      )
  
      self.space = space
      self.max_evals = max_evals
      self.trials = trials
      self.algo = algo
      self.warm_start = warm_start
      self.random_state = random_state
  
file_path: hyperopt/hyperopt/sklearn.py
imports: import numpy
  from sklearn.model_selection._search import is_classifier
  from sklearn.model_selection._search import BaseSearchCV
  from sklearn.utils.multiclass import check_classification_targets, unique_labels
  from sklearn.utils.validation import check_array
  from hyperopt.base import STATUS_OK, Trials
  from hyperopt.fmin import fmin
label_desc: Use image node_id 1 to create a new HyperoptSearchCV object from inherited base classes: BaseSearchCV with example: obj = HyperoptSearchCV(estimator, space, max_evals, trials, algo, warm_start, scoring, n_jobs, refit, cv, verbose, pre_dispatch, random_state, error_score, return_train_score)