From 6345a1d21853cd2a2291c810449d41012a084c01 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 1 Oct 2019 17:24:33 +0200 Subject: [PATCH] updates --- utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/utils.py b/utils/utils.py index 4ed84a2c..250bec33 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -226,7 +226,7 @@ def compute_ap(recall, precision): """ # Append sentinel values to beginning and end - mrec = np.concatenate(([0.], recall, [1.])) + mrec = np.concatenate(([0.], recall, [min(recall[-1] + 1E-3, 1.)])) mpre = np.concatenate(([0.], precision, [0.])) # Compute the precision envelope