docstr: Evaluate decision function output for X relative to y_true.
  
  Parameters
  ----------
  method_caller : callable
      Returns predictions given an estimator, method name, and other
      arguments, potentially caching results.
  
  clf : object
      Trained classifier to use for scoring. Must have either a
      decision_function method or a predict_proba method; the output of
      that is used to compute the score.
  
  X : array-like or sparse matrix
      Test data that will be fed to clf.decision_function or
      clf.predict_proba.
  
  y : array-like
      Gold standard target values for X. These must be class labels,
      not decision function values.
  
  sample_weight : array-like, optional (default=None)
      Sample weights.
  
  Returns
  -------
  score : float
      Score function applied to prediction of estimator on X.
docstr_tok: ["Evaluate","decision","function","output","for","X","relative","to","y_true",".","Parameters","--","--","--","--","--","method_caller",":","callable","Returns","predictions","given","an","estimator",",","method","name",",","and","other","arguments",",","potentially","caching","results",".","clf",":","object","Trained","classifier","to","use","for","scoring",".","Must","have","either","a","decision_function","method","or","a","predict_proba","method",";","the","output","of","that","is","used","to","compute","the","score",".","X",":","array-like","or","sparse","matrix","Test","data","that","will","be","fed","to","clf.decision_function","or","clf.predict_proba",".","y",":","array-like","Gold","standard","target","values","for","X",".","These","must","be","class","labels",",","not","decision","function","values",".","sample_weight",":","array-like",",","optional","(","default=None",")","Sample","weights",".","Returns","--","--","--","-","score",":","float","Score","function","applied","to","prediction","of","estimator","on","X","."]
code: def _score(self, method_caller, clf, X, y, sample_weight=None):
      """Evaluate decision function output for X relative to y_true.
  
      Parameters
      ----------
      method_caller : callable
          Returns predictions given an estimator, method name, and other
          arguments, potentially caching results.
  
      clf : object
          Trained classifier to use for scoring. Must have either a
          decision_function method or a predict_proba method; the output of
          that is used to compute the score.
  
      X : array-like or sparse matrix
          Test data that will be fed to clf.decision_function or
          clf.predict_proba.
  
      y : array-like
          Gold standard target values for X. These must be class labels,
          not decision function values.
  
      sample_weight : array-like, optional (default=None)
          Sample weights.
  
      Returns
      -------
      score : float
          Score function applied to prediction of estimator on X.
      """
  
      try:
          return super()._score(
              method_caller=method_caller,
              clf=clf,
              X=X,
              y=y,
              sample_weight=sample_weight,
          )
      except Exception:
          warnings.warn(
              _fit_failed_message_warning.format(
                  repr(self), self.error_score, traceback.format_exc()
              ),
              FitFailedWarning,
          )
          return self.error_score
  
imports: import traceback
  import warnings
  from typing import Callable
  import numpy
  from sklearn.exceptions import FitFailedWarning
  from sklearn.metrics._scorer import _PredictScorer, _ProbaScorer, _ThresholdScorer
  from sklearn.preprocessing import LabelEncoder
  from sklearn.utils import _safe_indexing
  from pycaret.utils.generic import get_label_encoder
label_desc: Use image node_id 2 for calling the _ThresholdScorerWithErrorScore obj's underlying member method code with example usage: obj._score(method_caller, clf, X, y, sample_weight) and returns: super, self