tempo_eval.ape1

tempo_eval.ape1(reference_tempo, estimated_tempo, factor=1.0)[source]

Absolute percentage error for two tempi values allowing for a given factor. If a reference tempo of 0 is given, this function returns NaN. If an estimate of None is given, this function returns NaN.

When averaged, results correspond to MAPE1.

See also ape2.

Parameters
  • reference_tempo (float) – a reference tempo, should not be 0

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

  • factor (float) – multiplication factor

Returns

the absolute percentage error

Return type

float