Spaces:
Runtime error
Runtime error
brian920128
commited on
Commit
•
d38c9a3
1
Parent(s):
36ed57b
wrrawawr
Browse files- doc_retrieve_metrics.py +2 -2
doc_retrieve_metrics.py
CHANGED
@@ -71,7 +71,7 @@ def calculate_precision(
|
|
71 |
hits += 1
|
72 |
|
73 |
if len(predicted_titles) != 0:
|
74 |
-
precision +=
|
75 |
|
76 |
count += 1
|
77 |
|
@@ -94,7 +94,7 @@ def calculate_recall(
|
|
94 |
for title in predicted_titles:
|
95 |
if title in d:
|
96 |
hits += 1
|
97 |
-
recall +=
|
98 |
|
99 |
count += 1
|
100 |
|
|
|
71 |
hits += 1
|
72 |
|
73 |
if len(predicted_titles) != 0:
|
74 |
+
precision += hits / len(predicted_titles)
|
75 |
|
76 |
count += 1
|
77 |
|
|
|
94 |
for title in predicted_titles:
|
95 |
if title in d:
|
96 |
hits += 1
|
97 |
+
recall += hits / len(d)
|
98 |
|
99 |
count += 1
|
100 |
|