From 5d955d9c3c071a9943e0d55ab4a4140b3f831d0d Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Mon, 15 Jul 2019 14:47:59 +0200 Subject: [PATCH] Reverted previous change Signed-off-by: Jim Martens --- src/twomartens/masterthesis/evaluate.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/twomartens/masterthesis/evaluate.py b/src/twomartens/masterthesis/evaluate.py index 0fe60b7..6b45b7c 100644 --- a/src/twomartens/masterthesis/evaluate.py +++ b/src/twomartens/masterthesis/evaluate.py @@ -305,8 +305,7 @@ def get_f1_score(cumulative_precisions: List[np.ndarray], if not np.count_nonzero(cumulative_precision + cumulative_recall): cumulative_f1_scores.append([]) continue - f1_score = 2 * ((cumulative_precision[-1] * cumulative_recall[-1]) / - (cumulative_precision[-1] + cumulative_recall[-1] + 0.001)) + f1_score = 2 * ((cumulative_precision * cumulative_recall) / (cumulative_precision + cumulative_recall + 0.001)) cumulative_f1_scores.append(f1_score) return cumulative_f1_scores