class_docstr: This code is private in scikit-learn 0.24, so it is copied here.
class_docstr_tok: ["This","code","is","private","in","scikit-learn","0.24",",","so","it","is","copied","here","."]
docstr: Evaluate predicted target values for X relative to y_true.
  Parameters
  ----------
  estimator : object
      Trained estimator to use for scoring. Must have a predict_proba
      method; the output of that is used to compute the score.
  X : {array-like, sparse matrix}
      Test data that will be fed to estimator.predict.
  y_true : array-like
      Gold standard target values for X.
  sample_weight : array-like of shape (n_samples,), default=None
      Sample weights.
  Returns
  -------
  score : float
      Score function applied to prediction of estimator on X.
docstr_tok: ["Evaluate","predicted","target","values","for","X","relative","to","y_true",".","Parameters","--","--","--","--","--","estimator",":","object","Trained","estimator","to","use","for","scoring",".","Must","have","a","predict_proba","method",";","the","output","of","that","is","used","to","compute","the","score",".","X",":","{","array-like",",","sparse","matrix","}","Test","data","that","will","be","fed","to","estimator.predict",".","y_true",":","array-like","Gold","standard","target","values","for","X.","sample_weight",":","array-like","of","shape","(","n_samples",",",")",",","default=None","Sample","weights",".","Returns","--","--","--","-","score",":","float","Score","function","applied","to","prediction","of","estimator","on","X","."]
code: def __call__(self, estimator, X, y_true, sample_weight=None):
      """Evaluate predicted target values for X relative to y_true.
      Parameters
      ----------
      estimator : object
          Trained estimator to use for scoring. Must have a predict_proba
          method; the output of that is used to compute the score.
      X : {array-like, sparse matrix}
          Test data that will be fed to estimator.predict.
      y_true : array-like
          Gold standard target values for X.
      sample_weight : array-like of shape (n_samples,), default=None
          Sample weights.
      Returns
      -------
      score : float
          Score function applied to prediction of estimator on X.
      """
      return self._score(
          partial(_cached_call, None),
          estimator,
          X,
          y_true,
          sample_weight=sample_weight,
      )
  
file_path: greykite/greykite/sklearn/sklearn_scorer.py
imports: import warnings
  from functools import partial
  import numpy
  from greykite.common.constants import PREDICTED_COL
label_desc: Use image node_id 5 for calling the _BaseScorer obj's underlying member method code with example usage: obj.__call__(estimator, X, y_true, sample_weight) and returns: self