class_docstr: Class that keeps count of the confusion matrix for classification.
  
  Also provides helper methods computes precision, recall, f1, weighted_f1 for
  classification.
class_docstr_tok: ["Class","that","keeps","count","of","the","confusion","matrix","for","classification",".","Also","provides","helper","methods","computes","precision",",","recall",",","f1",",","weighted_f1","for","classification","."]
docstr: Indicates whether this metric should be macro-averaged when globally reported.
code: def macro_average(self) -> bool:
      """
      Indicates whether this metric should be macro-averaged when globally reported.
      """
      return True
  
imports: from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.utils.torch import PipelineHelper, total_parameters, trainable_parameters
  from parlai.core.torch_agent import TorchAgent, Output
  from parlai.utils.misc import round_sigfigs, warn_once
  from parlai.core.metrics import Metric, AverageMetric
  from typing import List, Optional, Tuple, Dict, Union
  from typing import Counter
  from parlai.utils.typing import TScalar
  from parlai.utils.io import PathManager
  from sklearn.metrics import auc
  import parlai.utils.logging
  import torch.nn.functional
  import torch
  import math
label_desc: Use image node_id 1 for calling the ConfusionMatrixMetric obj's underlying member method code with example usage: obj.macro_average() and returns: True