class_docstr: Base class for scoring.
  
  Subclass and implement an ``on_*`` method before using.
class_docstr_tok: ["Base","class","for","scoring",".","Subclass","and","implement","an","``","on_","*","``","method","before","using","."]
docstr: Find name of scoring function.
docstr_tok: ["Find","name","of","scoring","function","."]
code: def _get_name(self):
      """Find name of scoring function."""
      if self.name is not None:
          return self.name
      if self.scoring_ is None:
          return "score"
      if isinstance(self.scoring_, str):
          return self.scoring_
      if isinstance(self.scoring_, partial):
          return self.scoring_.func.__name__
      if isinstance(self.scoring_, _BaseScorer):
          if hasattr(self.scoring_._score_func, "__name__"):
              # sklearn < 0.22
              return self.scoring_._score_func.__name__
          # sklearn >= 0.22
          return self.scoring_._score_func._score_func.__name__
      if isinstance(self.scoring_, dict):
          raise ValueError(
              "Dict not supported as scorer for multi-metric scoring."
              " Register multiple scoring callbacks instead."
          )
      return self.scoring_.__name__
  
imports: from contextlib import contextmanager
  from contextlib import suppress
  from functools import partial
  import warnings
  import numpy
  import sklearn
  from sklearn.metrics import make_scorer, check_scoring
  from skorch.callbacks import Callback
  from skorch.dataset import unpack_data
  from sklearn.metrics._scorer import _BaseScorer
  from skorch.utils import data_from_dataset
  from skorch.utils import is_skorch_dataset
  from skorch.utils import to_numpy
  from skorch.utils import check_indexing
  from skorch.utils import to_device
label_desc: Use image node_id 2 for calling the ScoringBase obj's underlying member method code with example usage: obj._get_name() and returns: self, self, str, self, self, self, self