class_docstr: Evaluation class for measuring Precision, Recall and F-measure of onsets.
  
  Parameters
  ----------
  detections : str, list or numpy array
      Detected notes.
  annotations : str, list or numpy array
      Annotated ground truth notes.
  window : float, optional
      F-measure evaluation window [seconds]
  combine : float, optional
      Combine all annotated onsets within `combine` seconds.
  delay : float, optional
      Delay the detections `delay` seconds for evaluation.
class_docstr_tok: ["Evaluation","class","for","measuring","Precision",",","Recall","and","F-measure","of","onsets",".","Parameters","--","--","--","--","--","detections",":","str",",","list","or","numpy","array","Detected","notes",".","annotations",":","str",",","list","or","numpy","array","Annotated","ground","truth","notes",".","window",":","float",",","optional","F-measure","evaluation","window","[","seconds","]","combine",":","float",",","optional","Combine","all","annotated","onsets","within","`","combine","`","seconds",".","delay",":","float",",","optional","Delay","the","detections","`","delay","`","seconds","for","evaluation","."]
code: def __init__(
      self,
      detections,
      annotations,
      window=WINDOW,
      combine=0,
      delay=0,
      **kwargs,
  ):
      # convert to numpy array
      detections = np.array(detections, dtype=float, ndmin=1)
      annotations = np.array(annotations, dtype=float, ndmin=1)
      # combine the annotations if needed
      if combine > 0:
          annotations = combine_events(annotations, combine)
      # shift the detections if needed
      if delay != 0:
          detections += delay
      # evaluate
      tp, fp, tn, fn, errors = onset_evaluation(
          detections, annotations, window
      )
      # instantiate a Evaluation object
      super(OnsetEvaluation, self).__init__(tp, fp, tn, fn, **kwargs)
      # add the errors
      self.errors = errors
  
imports: from __future__ import absolute_import, division, print_function
  import numpy
  from .None import Evaluation, MeanEvaluation, SumEvaluation, evaluation_io
  from ..io import load_onsets
  from ..utils import combine_events
label_desc: Use image node_id 1 to create a new OnsetEvaluation object from inherited base classes: Evaluation with example: obj = OnsetEvaluation(detections, annotations, window, combine, delay)