class_docstr: metric is an abstract class.
  Args:
      average (bool): a way to output one single value for metrics
                      that are calculated in several trials.
class_docstr_tok: ["metric","is","an","abstract","class",".","Args",":","average","(","bool",")",":","a","way","to","output","one","single","value","for","metrics","that","are","calculated","in","several","trials","."]
docstr: output the metric results (array shape) or averaging
  out over the results to output one single float number.
  
  Returns:
      result (np.array / float): final metric result
docstr_tok: ["output","the","metric","results","(","array","shape",")","or","averaging","out","over","the","results","to","output","one","single","float","number",".","Returns",":","result","(","np.array","\/","float",")",":","final","metric","result"]
code: def value(self):
      """output the metric results (array shape) or averaging
      out over the results to output one single float number.
  
      Returns:
          result (np.array / float): final metric result
  
      """
      self.result = torch.FloatTensor(self.calculate_result())
      if self._average and self.result.numel() == self.result.size(0):
          return self.result.mean(0).cpu().numpy().item()
      elif self._average:
          return self.result.mean(0).cpu().numpy()
      else:
          return self.result.cpu().numpy()
  
imports: import dataclasses
  import math
  import warnings
  from collections import defaultdict
  import numpy
  import torch
  from sklearn.metrics import confusion_matrix, auc
  from baal.utils.array_utils import to_prob
label_desc: Use image node_id 6 for calling the Metrics obj's underlying member method code with example usage: obj.value() and returns: self, self, self