code: def test_results(self):
      # empty detections and annotations
      tp, fp, tn, fn, errors = note_onset_evaluation([[]], [[]], 0.02)
      self.assertTrue(np.allclose(tp, np.zeros((0, 2))))
      self.assertTrue(np.allclose(fp, np.zeros((0, 2))))
      self.assertTrue(np.allclose(tn, np.zeros((0, 2))))
      self.assertTrue(np.allclose(fn, np.zeros((0, 2))))
      self.assertTrue(np.allclose(errors, np.zeros((0, 2))))
      # empty annotations
      tp, fp, tn, fn, errors = note_onset_evaluation(
          DETECTIONS, [[]], 0.02
      )
      self.assertTrue(np.allclose(tp, np.zeros((0, 2))))
      self.assertTrue(np.allclose(fp, DETECTIONS))
      self.assertTrue(np.allclose(tn, np.zeros((0, 2))))
      self.assertTrue(np.allclose(fn, np.zeros((0, 2))))
      self.assertTrue(np.allclose(errors, np.zeros((0, 2))))
      # empty detections
      tp, fp, tn, fn, errors = note_onset_evaluation(
          [[]], ANNOTATIONS, 0.02
      )
      self.assertTrue(np.allclose(tp, np.zeros((0, 2))))
      self.assertTrue(np.allclose(fp, np.zeros((0, 2))))
      self.assertTrue(np.allclose(tn, np.zeros((0, 2))))
      self.assertTrue(np.allclose(fn, ANNOTATIONS))
      self.assertTrue(np.allclose(errors, np.zeros((0, 2))))
      # window = 0.01
      tp, fp, tn, fn, errors = note_onset_evaluation(
          DETECTIONS, ANNOTATIONS, 0.01
      )
      self.assertTrue(
          np.allclose(tp, [[0.147, 72], [3.368, 75], [3.449, 43]])
      )
      self.assertTrue(
          np.allclose(
              fp, [[0.147, 60], [0.147, 80], [2.520, 60], [2.540, 77]]
          )
      )
      self.assertTrue(np.allclose(tn, np.zeros((0, 2))))
      self.assertTrue(
          np.allclose(
              fn,
              [
                  [1.567, 41],
                  [2.526, 77],
                  [2.549, 60],
                  [2.563, 65],
                  [2.577, 56],
              ],
          )
      )
      self.assertTrue(
          np.allclose(errors, [[0, 72], [-0.001, 75], [0, 43]])
      )
      # default window (= 0.025)
      tp, fp, tn, fn, errors = note_onset_evaluation(
          DETECTIONS, ANNOTATIONS
      )
      self.assertTrue(
          np.allclose(
              tp, [[0.147, 72], [2.540, 77], [3.368, 75], [3.449, 43]]
          )
      )
      self.assertTrue(
          np.allclose(fp, [[0.147, 60], [0.147, 80], [2.520, 60]])
      )
      self.assertTrue(np.allclose(tn, np.zeros((0, 2))))
      self.assertTrue(
          np.allclose(
              fn, [[1.567, 41], [2.549, 60], [2.563, 65], [2.577, 56]]
          )
      )
      self.assertTrue(
          np.allclose(
              errors, [[0, 72], [0.014, 77], [-0.001, 75], [0, 43]]
          )
      )
      # window = 0.03
      tp, fp, tn, fn, errors = note_onset_evaluation(
          DETECTIONS, ANNOTATIONS, 0.03
      )
      self.assertTrue(
          np.allclose(
              tp,
              [
                  [0.147, 72],
                  [2.520, 60],
                  [2.540, 77],
                  [3.368, 75],
                  [3.449, 43],
              ],
          )
      )
      self.assertTrue(np.allclose(fp, [[0.147, 60], [0.147, 80]]))
      self.assertTrue(np.allclose(tn, np.zeros((0, 2))))
      self.assertTrue(
          np.allclose(fn, [[1.567, 41], [2.563, 65], [2.577, 56]])
      )
      self.assertTrue(
          np.allclose(
              errors,
              [
                  [0, 72],
                  [-0.029, 60],
                  [0.014, 77],
                  [-0.001, 75],
                  [0, 43],
              ],
          )
      )
  
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 TestNoteOnsetEvaluationFunction obj's underlying member method code with example usage: obj.test_results() without return types