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)
Other benchmarking:
Benchmark,
benchmark_from_file(),
benchmark_from_result(),
collect_benchmark_results(),
ionstar_bench_preprocess(),
make_benchmark(),
ms_bench_add_scores(),
ms_bench_auc(),
plot_benchmark_comparison(),
read_benchmark_results(),
read_contrast_results(),
write_benchmark_results(),
write_contrast_results()
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)
stopifnot(is.numeric(ap), length(ap) == 1, ap > 0)