tempo_eval.ape2

tempo_eval.ape2(reference_tempo, estimated_tempo)[source]

Minimum of the absolute percentage error for two tempi values allowing the factors 1, 2, 3, 1/2, and 1/3. If an estimate of None is given, this function returns NaN.

When averaged, results correspond to MAPE2.

See also ape1.

Parameters
  • reference_tempo (float) – a references tempo, must not be 0

  • estimated_tempo (Optional[float]) – an estimated tempo

Returns

the minimal absolute percentage error for the factors 1, 2, 3, 1/2, and 1/3.

Return type

float