This commit is contained in:
Glenn Jocher 2019-12-24 12:26:35 -08:00
parent 1e1cffae8b
commit 804f82a4b0
1 changed files with 1 additions and 2 deletions

View File

@ -223,8 +223,7 @@ def compute_ap(recall, precision):
mpre = np.concatenate(([0.], precision, [0.])) mpre = np.concatenate(([0.], precision, [0.]))
# Compute the precision envelope # Compute the precision envelope
for i in range(mpre.size - 1, 0, -1): mpre = np.flip(np.maximum.accumulate(np.flip(mpre)))
mpre[i - 1] = np.maximum(mpre[i - 1], mpre[i])
# Integrate area under curve # Integrate area under curve
method = 'interp' # methods: 'continuous', 'interp' method = 'interp' # methods: 'continuous', 'interp'