class_docstr: emotion postprocess
class_docstr_tok: ["emotion","postprocess"]
docstr: update confusion
docstr_tok: ["update","confusion"]
code: def update_metrics(self, prediction, confusion):
      """update confusion"""
      conf = confusion_matrix(
          y_true=prediction["labels"],
          y_pred=np.argmax(prediction["softmax"], -1),
          labels=list(range(self.num_class)),
      )
      if conf.shape != (self.num_class, self.num_class):
          raise ValueError(
              "Warning: confusion matrix shape error, shape {}".format(
                  conf.shape
              )
          )
      confusion += conf
      return confusion
  
file_path: delta/delta/utils/postprocess/speech_cls_proc.py
imports: import os
  import pickle
  import collections
  import numpy
  from absl import logging
  from sklearn.metrics import confusion_matrix
  from delta import utils
  from delta.utils.postprocess.base_postproc import PostProc
  from delta.utils.register import registers
label_desc: Use image node_id 3 for calling the EmoPostProc obj's underlying member method code with example usage: obj.update_metrics(prediction, confusion) and returns: confusion