code: def test_results(self):
      # empty sum evaluation
      e = NoteSumEvaluation([])
      self.assertEqual(e.num_tp, 0)
      self.assertEqual(e.num_fp, 0)
      self.assertEqual(e.num_tn, 0)
      self.assertEqual(e.num_fn, 0)
      self.assertEqual(e.precision, 1)
      self.assertEqual(e.recall, 1)
      self.assertEqual(e.fmeasure, 1)
      self.assertEqual(e.accuracy, 1)
      self.assertTrue(np.allclose(e.errors, np.zeros((0, 2))))
      self.assertTrue(math.isnan(e.mean_error))
      self.assertTrue(math.isnan(e.std_error))
      # sum evaluation of empty note evaluation
      e1 = NoteEvaluation([], [])
      e = NoteSumEvaluation([e1])
      self.assertEqual(e.num_tp, 0)
      self.assertEqual(e.num_fp, 0)
      self.assertEqual(e.num_tn, 0)
      self.assertEqual(e.num_fn, 0)
      self.assertEqual(e.precision, 1)
      self.assertEqual(e.recall, 1)
      self.assertEqual(e.fmeasure, 1)
      self.assertEqual(e.accuracy, 1)
      self.assertTrue(np.allclose(e.errors, np.zeros((0, 2))))
      self.assertTrue(math.isnan(e.mean_error))
      self.assertTrue(math.isnan(e.std_error))
      # sum evaluation of empty and real onset evaluation
      e2 = NoteEvaluation(DETECTIONS, ANNOTATIONS)
      e = NoteSumEvaluation([e1, e2])
      # everything must be the same as e2, since e1 was empty and thus did
      # not ad anything to the sum evaluation
      self.assertEqual(e.num_tp, e2.num_tp)
      self.assertEqual(e.num_fp, e2.num_fp)
      self.assertEqual(e.num_tn, e2.num_tn)
      self.assertEqual(e.num_fn, e2.num_fn)
      self.assertEqual(e.precision, e2.precision)
      self.assertEqual(e.recall, e2.recall)
      self.assertEqual(e.fmeasure, e2.fmeasure)
      self.assertEqual(e.accuracy, e2.accuracy)
      self.assertTrue(np.allclose(e.errors, e2.errors))
      self.assertEqual(e.mean_error, e2.mean_error)
      self.assertEqual(e.std_error, e2.std_error)
  
imports: from __future__ import absolute_import, division, print_function
  import math
  import unittest
  from madmom.evaluation.notes import *
  from .None import ANNOTATIONS_PATH, DETECTIONS_PATH
label_desc: Use image node_id 2 for calling the TestNoteSumEvaluationClass obj's underlying member method code with example usage: obj.test_results() without return types