class_docstr: Base class for hyper parameter search with cross-validation.
class_docstr_tok: ["Base","class","for","hyper","parameter","search","with","cross-validation","."]
docstr: Returns the score on the given data, if the estimator has been refit.
  
  This uses the score defined by ``scoring`` where provided, and the
  ``best_estimator_.score`` method otherwise.
  
  Parameters
  ----------
  X : array-like, shape = [n_samples, n_features]
      Input data, where n_samples is the number of samples and
      n_features is the number of features.
  
  y : array-like, shape = [n_samples] or [n_samples, n_output], optional
      Target relative to X for classification or regression;
      None for unsupervised learning.
  
  Returns
  -------
  score : float
  
  Notes
  -----
   * The long-standing behavior of this method changed in version 0.16.
   * It no longer uses the metric provided by ``estimator.score`` if the
     ``scoring`` parameter was set when fitting.
code: def score(self, X, y=None):
      """Returns the score on the given data, if the estimator has been refit.
  
      This uses the score defined by ``scoring`` where provided, and the
      ``best_estimator_.score`` method otherwise.
  
      Parameters
      ----------
      X : array-like, shape = [n_samples, n_features]
          Input data, where n_samples is the number of samples and
          n_features is the number of features.
  
      y : array-like, shape = [n_samples] or [n_samples, n_output], optional
          Target relative to X for classification or regression;
          None for unsupervised learning.
  
      Returns
      -------
      score : float
  
      Notes
      -----
       * The long-standing behavior of this method changed in version 0.16.
       * It no longer uses the metric provided by ``estimator.score`` if the
         ``scoring`` parameter was set when fitting.
  
      """
      if self.scorer_ is None:
          raise ValueError(
              "No score function explicitly defined, "
              "and the estimator doesn't provide one %s"
              % self.best_estimator_
          )
      if self.scoring is not None and hasattr(
          self.best_estimator_, "score"
      ):
          warnings.warn(
              "The long-standing behavior to use the estimator's "
              "score function in {0}.score has changed. The "
              "scoring parameter is now used."
              "".format(self.__class__.__name__),
              ChangedBehaviorWarning,
          )
      return self.scorer_(self.best_estimator_, X, y)
  
imports: from __future__ import print_function
  from abc import ABCMeta, abstractmethod
  from collections import Mapping, namedtuple, Sized
  from functools import partial, reduce
  from itertools import product
  import operator
  import warnings
  import numpy
  from .base import BaseEstimator, is_classifier, clone
  from .base import MetaEstimatorMixin
  from .cross_validation import check_cv
  from .cross_validation import _fit_and_score
  from .externals.joblib import Parallel, delayed
  from .externals import six
  from .utils import check_random_state
  from .utils.random import sample_without_replacement
  from .utils.validation import _num_samples, indexable
  from .utils.metaestimators import if_delegate_has_method
  from .metrics.scorer import check_scoring
  from .exceptions import ChangedBehaviorWarning
label_desc: Use image node_id 3 for calling the BaseSearchCV obj's underlying member method code with example usage: obj.score(X, y) and returns: self