This commit is contained in:
Glenn Jocher 2019-10-01 17:24:33 +02:00
parent 84f0df6c34
commit 6345a1d218
1 changed files with 1 additions and 1 deletions

View File

@ -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