code: def score(self, X, y, compute=True):
          
          scoring = self.scoring
          X = self._check_array(X)
          y = self._check_array(y)
  
          if not scoring:
              if type(self._postfit_estimator).score == sklearn.base.RegressorMixin.score:
                  scoring = "r2"
              elif (
                  type(self._postfit_estimator).score
                  == sklearn.base.ClassifierMixin.score
              ):
                  scoring = "accuracy"
          else:
              scoring = self.scoring
  
          if scoring:
              if not dask.is_dask_collection(X) and not dask.is_dask_collection(y):
                  scorer = sklearn.metrics.get_scorer(scoring)
              else:
                  scorer = get_scorer(scoring, compute=compute)
              return scorer(self, X, y)
          else:
              return self._postfit_estimator.score(X, y)
docs: Returns the score on the given data.
  
          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
                  return self.estimator.score(X, y)