class_docstr: metrics utils unittest
class_docstr_tok: ["metrics","utils","unittest"]
docstr: test stats of confusion matrix
docstr_tok: ["test","stats","of","confusion","matrix"]
code: def test_stats_confusion(self):
      """test stats of confusion matrix"""
      confusion = np.array(
          [[5, 1, 1, 0], [0, 10, 0, 1], [0, 0, 6, 1], [0, 0, 1, 6]]
      )
  
      tn, fp, fn, tp = metric_utils.stats_confusion(confusion)
      self.assertEqual(len(tp), 4)
      self.assertAllEqual(tn, [20, 11, 19, 19])
      self.assertAllEqual(fp, [0, 1, 2, 2])
      self.assertAllEqual(fn, [2, 1, 1, 1])
      self.assertAllEqual(tp, [5, 10, 6, 6])
  
file_path: delta/delta/utils/metrics/metric_utils_test.py
imports: import numpy
  import delta.compat
  from delta.utils.metrics import metric_utils
label_desc: Use image node_id 3 for calling the MetricUtilsTest obj's underlying member method code with example usage: obj.test_stats_confusion() without return types