class_docstr: Scorer wraps an external or custom metric function to align it with AutoGluon's metric logic and API.
  Scorer will alter the returned metric output to ensure higher_is_better and to allow computing metric error. This greatly simplifies downstream logic.
  All metric logic within AutoGluon should use Scorer to ensure consistency whenever possible.
  
  Parameters
  ----------
  name : str
      Name of the metric. Used in logs and as a key in dictionaries when multiple metric outputs are computed.
  score_func : callable
      Scoring metric function that will be called internally to score.
      Required to be a callable with the first two arguments corresponding to y_true, y_pred that returns a float indicating the metric value.
  optimum : float
      The highest/best value the metric can return. For example, optimal=1 for accuracy, optimal=0 for mean_squared_error.
      This is used to calculate regret / error. For example, a score of 1 for accuracy would have an error of 0.
      NOTE: This value should be for the original score_func prior to changing the sign of the metric output.
          For example, if score_func is lower_is_better with an optimum of -2 (aka a value of 0.5 has an error of 2.5),
          then you should specify `optimum=-2, sign=-1`.
  sign : int
      Valid values are 1 and -1.
      The sign of the metric to ensure greater_is_better.
      For score metrics such as accuracy and r2, the sign should be 1.
      For error metrics such as log_loss and mean_squared_error, the sign should be -1.
  kwargs : dict, optional
      kwargs to pass to score_func when called.
      For example, kwargs = {"beta": 2} when using sklearn.metrics.fbeta_score where beta is a required argument.
class_docstr_tok: ["Scorer","wraps","an","external","or","custom","metric","function","to","align","it","with","AutoGluon","'s","metric","logic","and","API",".","Scorer","will","alter","the","returned","metric","output","to","ensure","higher_is_better","and","to","allow","computing","metric","error",".","This","greatly","simplifies","downstream","logic",".","All","metric","logic","within","AutoGluon","should","use","Scorer","to","ensure","consistency","whenever","possible",".","Parameters","--","--","--","--","--","name",":","str","Name","of","the","metric",".","Used","in","logs","and","as","a","key","in","dictionaries","when","multiple","metric","outputs","are","computed",".","score_func",":","callable","Scoring","metric","function","that","will","be","called","internally","to","score",".","Required","to","be","a","callable","with","the","first","two","arguments","corresponding","to","y_true",",","y_pred","that","returns","a","float","indicating","the","metric","value",".","optimum",":","float","The","highest\/best","value","the","metric","can","return",".","For","example",",","optimal=1","for","accuracy",",","optimal=0","for","mean_squared_error",".","This","is","used","to","calculate","regret","\/","error",".","For","example",",","a","score","of","1","for","accuracy","would","have","an","error","of","0",".","NOTE",":","This","value","should","be","for","the","original","score_func","prior","to","changing","the","sign","of","the","metric","output",".","For","example",",","if","score_func","is","lower_is_better","with","an","optimum","of","-2","(","aka","a","value","of","0.5","has","an","error","of","2.5",")",",","then","you","should","specify","`","optimum=-2",",","sign=-1","`",".","sign",":","int","Valid","values","are","1","and","-1",".","The","sign","of","the","metric","to","ensure","greater_is_better",".","For","score","metrics","such","as","accuracy","and","r2",",","the","sign","should","be","1",".","For","error","metrics","such","as","log_loss","and","mean_squared_error",",","the","sign","should","be","-1.","kwargs",":","dict",",","optional","kwargs","to","pass","to","score_func","when","called",".","For","example",",","kwargs","=","{","``","beta","''",":","2","}","when","using","sklearn.metrics.fbeta_score","where","beta","is","a","required","argument","."]
docstr: Scores are always greater_is_better, this flips the sign of metrics who were originally lower_is_better.
docstr_tok: ["Scores","are","always","greater_is_better",",","this","flips","the","sign","of","metrics","who","were","originally","lower_is_better","."]
code: def convert_score_to_original(self, score: float) -> float:
      """Scores are always greater_is_better, this flips the sign of metrics who were originally lower_is_better."""
      return self._sign * score
  
imports: import json
  from abc import ABCMeta, abstractmethod
  from functools import partial
  import numpy
  import scipy
  import scipy.stats
  import sklearn.metrics
  from ..constants import BINARY, MULTICLASS, QUANTILE, REGRESSION, SOFTCLASS
  from .None import classification_metrics, quantile_metrics
  from .classification_metrics import confusion_matrix
label_desc: Use image node_id 11 for calling the Scorer obj's underlying member method code with example usage: obj.convert_score_to_original(score) and returns: unknown