Trapezoid integration of Recall (x-axis) vs Precision (y-axis),
analogous to ms_bench_auc for ROC curves.
ms_bench_ap(recall, precision, recall_threshold = 1)numeric AP score (0-100 scale)
recall <- c(0, 0.2, 0.4, 0.6, 0.8, 1.0)
precision <- c(1.0, 0.9, 0.85, 0.8, 0.7, 0.6)
ap <- ms_bench_ap(recall, precision)
#> Error in ms_bench_ap(recall, precision): could not find function "ms_bench_ap"
stopifnot(is.numeric(ap), length(ap) == 1, ap > 0)
#> Error: object 'ap' not found