class_docstr: Distributed multi-model search meta-estimator. Similar to
  `DistRandomizedSearchCV` but with handling for multiple models.
  Takes a `models` input containing a list of tuples, each with a
  string name, instantiated estimator object, and parameter set
  dictionary for random search.
  
  The fit method will compute a cross validation score for each
  estimator/parameter set combination after randomly sampling from
  the parameter set for each estimator. The best estimator/parameter
  set combination will be refit if appropriate. The process is distrubuted
  with spark if a sparkContext is provided, else joblib is used.
  
  Args:
      models (array-like): List of tuples containing estimator and parameter
          set information to generate candidates. Each tuple is of the form:
          ('name' <str>, 'estimator' <sklearn Estimator>, 'param_set' <dict>)
          For example: ('rf', RandomForestClassifier(), {'max_depth': [5,10]})
      sc (sparkContext): Spark context for spark broadcasting and rdd operations.
      partitions (int or 'auto'): default 'auto'
          Number of partitions to use for parallelization of parameter
          search space. Integer values or None will be used directly for `numSlices`,
          while 'auto' will set `numSlices` to the number required fits.
      n (int): Number of parameter sets to sample from parameter space for each
          estimator.
      cv (int, cross-validation generator or an iterable): Determines the
          cross-validation splitting strategy.
      scoring (string, callable, list/tuple, dict or None): A single string or a
          callable to evaluate the predictions on the test set. If None,
          the estimator's score method is used.
      random_state (int): Random state used throughout to ensure consistent runs.
      verbose (int, bool): Used to indicate level of stdout logging.
      refit (bool): Refits best estimator at the end of fit method.
      n_jobs (int): Number of jobs to run in parallel. Only used if sc=None.
          ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
          ``-1`` means using all processors.
      pre_dispatch (int): Controls the number of jobs that get dispatched
          during parallel execution. Reducing this number can be useful
          to avoid an explosion of memory consumption when more jobs
          get dispatched than CPUs can process. Only used if sc=None.
class_docstr_tok: ["Distributed","multi-model","search","meta-estimator",".","Similar","to","`","DistRandomizedSearchCV","`","but","with","handling","for","multiple","models",".","Takes","a","`","models","`","input","containing","a","list","of","tuples",",","each","with","a","string","name",",","instantiated","estimator","object",",","and","parameter","set","dictionary","for","random","search",".","The","fit","method","will","compute","a","cross","validation","score","for","each","estimator\/parameter","set","combination","after","randomly","sampling","from","the","parameter","set","for","each","estimator",".","The","best","estimator\/parameter","set","combination","will","be","refit","if","appropriate",".","The","process","is","distrubuted","with","spark","if","a","sparkContext","is","provided",",","else","joblib","is","used",".","Args",":","models","(","array-like",")",":","List","of","tuples","containing","estimator","and","parameter","set","information","to","generate","candidates",".","Each","tuple","is","of","the","form",":","(","'name","'","<","str",">",",","'estimator","'","<","sklearn","Estimator",">",",","'param_set","'","<","dict",">",")","For","example",":","(","'rf","'",",","RandomForestClassifier","(",")",",","{","'max_depth","'",":","[","5,10","]","}",")","sc","(","sparkContext",")",":","Spark","context","for","spark","broadcasting","and","rdd","operations",".","partitions","(","int","or","'auto","'",")",":","default","'auto'","Number","of","partitions","to","use","for","parallelization","of","parameter","search","space",".","Integer","values","or","None","will","be","used","directly","for","`","numSlices","`",",","while","'auto","'","will","set","`","numSlices","`","to","the","number","required","fits",".","n","(","int",")",":","Number","of","parameter","sets","to","sample","from","parameter","space","for","each","estimator",".","cv","(","int",",","cross-validation","generator","or","an","iterable",")",":","Determines","the","cross-validation","splitting","strategy",".","scoring","(","string",",","callable",",","list\/tuple",",","dict","or","None",")",":","A","single","string","or","a","callable","to","evaluate","the","predictions","on","the","test","set",".","If","None",",","the","estimator","'s","score","method","is","used",".","random_state","(","int",")",":","Random","state","used","throughout","to","ensure","consistent","runs",".","verbose","(","int",",","bool",")",":","Used","to","indicate","level","of","stdout","logging",".","refit","(","bool",")",":","Refits","best","estimator","at","the","end","of","fit","method",".","n_jobs","(","int",")",":","Number","of","jobs","to","run","in","parallel",".","Only","used","if","sc=None",".","``","None","``","means","1","unless","in","a",":","obj",":","`","joblib.parallel_backend","`","context",".","``","-1","``","means","using","all","processors",".","pre_dispatch","(","int",")",":","Controls","the","number","of","jobs","that","get","dispatched","during","parallel","execution",".","Reducing","this","number","can","be","useful","to","avoid","an","explosion","of","memory","consumption","when","more","jobs","get","dispatched","than","CPUs","can","process",".","Only","used","if","sc=None","."]
code: def transform(self, X):
      self._check_is_fitted()
      return self.best_estimator_.transform(X)
  
imports: import time
  import numbers
  import random
  import numpy
  import pandas
  from copy import copy
  from abc import ABCMeta
  from joblib import Parallel, delayed
  from sklearn.model_selection import ParameterGrid, GridSearchCV, RandomizedSearchCV, ParameterSampler, check_cv
  from sklearn.metrics import check_scoring
  from sklearn.base import BaseEstimator, is_classifier
  from sklearn.utils.metaestimators import if_delegate_has_method
  from sklearn.utils.validation import indexable
  from functools import partial
  from numpy.ma import MaskedArray
  from scipy.stats import rankdata
  from scipy.sparse import issparse
  from itertools import product
  from collections import defaultdict
  from .validation import _check_estimator, _check_base_estimator, _validate_params, _validate_models, _validate_names, _validate_estimators, _check_n_iter, _is_arraylike, _num_samples, _safe_indexing, _check_is_fitted
  from .utils import _multimetric_score, _num_samples, _aggregate_score_dicts, _score, _check_multimetric_scoring, _safe_split, _dict_slice_remove
  from .base import _clone, _get_value, _parse_partitions
label_desc: Use image node_id 8 for calling the DistMultiModelSearch obj's underlying member method code with example usage: obj.transform(X) and returns: self