Spaces:
Runtime error
Runtime error
DarrenChensformer
commited on
Commit
β’
f16fe66
1
Parent(s):
07926c5
Update action_generation.py to prevent zero division
Browse files- action_generation.py +1 -1
action_generation.py
CHANGED
@@ -84,7 +84,7 @@ class BaseEvaluater:
|
|
84 |
fn += len(set(label) - set(pred))
|
85 |
precision = tp / (tp + fp + self.eps)
|
86 |
recall = tp / (tp + fn + self.eps)
|
87 |
-
f1 = 2 * precision * recall / (precision + recall)
|
88 |
|
89 |
return {
|
90 |
"precision": round(precision, 4),
|
|
|
84 |
fn += len(set(label) - set(pred))
|
85 |
precision = tp / (tp + fp + self.eps)
|
86 |
recall = tp / (tp + fn + self.eps)
|
87 |
+
f1 = 2 * precision * recall / (precision + recall + self.eps)
|
88 |
|
89 |
return {
|
90 |
"precision": round(precision, 4),
|