tempo_acc1¶
MIREX Accuracy 1: octave-tolerant tempo accuracy.
Functions
|
MIREX Accuracy 1: fraction of predictions within |
- tempo_acc1(pred, target, tolerance=0.08, factors=(0.5, 1.0, 2.0))[source]¶
MIREX Accuracy 1: fraction of predictions within
toleranceof any octave-equivalent tempo.A prediction is correct if it is within
tolerance × factor × targetfor any factor infactors. The default 8% tolerance matches the MIREX evaluation standard.- Parameters:
pred (Tensor) – Predicted BPM values, shape
(B,).target (Tensor) – Ground-truth BPM values, shape
(B,).tolerance (float) – Relative tolerance (default: 0.08 → ±8%).
factors (tuple) – Metrical multiples to consider (default: 0.5×, 1×, 2×).
- Returns:
Fraction of correct predictions in
[0, 1], shape().- Return type:
Tensor