class_docstr: Base class for BoostSearch meta-estimator.
  
  Warning: This class should not be used directly. Use derived classes
  instead.
class_docstr_tok: ["Base","class","for","BoostSearch","meta-estimator",".","Warning",":","This","class","should","not","be","used","directly",".","Use","derived","classes","instead","."]
docstr: Return the score on the given test data and labels.
  
  Parameters
  ----------
  X : array-like of shape (n_samples, n_features)
      Test samples.
  
  y : array-like of shape (n_samples,)
      True values for X.
  
  sample_weight : array-like of shape (n_samples,), default=None
      Sample weights.
  
  Returns
  -------
  score : float
      Accuracy for classification, R2 for regression.
docstr_tok: ["Return","the","score","on","the","given","test","data","and","labels",".","Parameters","--","--","--","--","--","X",":","array-like","of","shape","(","n_samples",",","n_features",")","Test","samples",".","y",":","array-like","of","shape","(","n_samples",",",")","True","values","for","X.","sample_weight",":","array-like","of","shape","(","n_samples",",",")",",","default=None","Sample","weights",".","Returns","--","--","--","-","score",":","float","Accuracy","for","classification",",","R2","for","regression","."]
code: def score(self, X, y, sample_weight=None):
      """Return the score on the given test data and labels.
  
      Parameters
      ----------
      X : array-like of shape (n_samples, n_features)
          Test samples.
  
      y : array-like of shape (n_samples,)
          True values for X.
  
      sample_weight : array-like of shape (n_samples,), default=None
          Sample weights.
  
      Returns
      -------
      score : float
          Accuracy for classification, R2 for regression.
      """
  
      check_is_fitted(self)
  
      if hasattr(self, "transform"):
          X = self.transform(X)
  
      return self.estimator_.score(X, y, sample_weight=sample_weight)
  
imports: import io
  import contextlib
  import warnings
  import numpy
  import scipy
  from copy import deepcopy
  from sklearn.base import clone
  from sklearn.utils.validation import check_is_fitted
  from sklearn.base import BaseEstimator, TransformerMixin
  from joblib import Parallel, delayed
  from hyperopt import fmin, tpe
  from .utils import ParameterSampler, _check_param, _check_boosting
  from .utils import _set_categorical_indexes, _get_categorical_support
  from .utils import _feature_importances, _shap_importances
label_desc: Use image node_id 7 for calling the _BoostSearch obj's underlying member method code with example usage: obj.score(X, y, sample_weight) and returns: self