code: def evaluate(reference_onsets, estimated_onsets, **kwargs):
      
      # Compute all metrics
      scores = collections.OrderedDict()
  
      (scores['F-measure'],
       scores['Precision'],
       scores['Recall']) = util.filter_kwargs(f_measure, reference_onsets,
                                              estimated_onsets, **kwargs)
  
      return scores
docs: Compute all metrics for the given reference and estimated annotations.
  
      Examples
      --------
      >>> reference_onsets = mir_eval.io.load_events('reference.txt')
      >>> estimated_onsets = mir_eval.io.load_events('estimated.txt')
      >>> scores = mir_eval.onset.evaluate(reference_onsets,
      ...                                  estimated_onsets)
  
      Parameters
      ----------
      reference_onsets : np.ndarray
          reference onset locations, in seconds
      estimated_onsets : np.ndarray
          estimated onset locations, in seconds
      kwargs
          Additional keyword arguments which will be passed to the
          appropriate metric or preprocessing functions.
  
      Returns
      -------
      scores : dict
          Dictionary of scores, where the key is the metric name (str) and
          the value is the (float) score achieved.