Spaces:
Sleeping
Sleeping
maksymdolgikh
commited on
Commit
·
c6f936b
1
Parent(s):
fea11af
changes to "overall" metrics output
Browse files- seqeval_with_fbeta.py +13 -5
seqeval_with_fbeta.py
CHANGED
@@ -172,10 +172,18 @@ class Seqeval_With_Beta(evaluate.Metric):
|
|
172 |
}
|
173 |
for type_name, score in report.items()
|
174 |
}
|
175 |
-
scores["overall_precision"] = overall_score["precision"]
|
176 |
-
scores["overall_recall"] = overall_score["recall"]
|
177 |
-
scores["overall_f1"] = overall_score["f1-score"]
|
178 |
-
scores[f"overall_f{beta}"] = overall_score[f"f{beta}-score"]
|
179 |
-
scores["overall_accuracy"] = accuracy_score(y_true=references, y_pred=predictions)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
|
181 |
return scores
|
|
|
172 |
}
|
173 |
for type_name, score in report.items()
|
174 |
}
|
175 |
+
# scores["overall_precision"] = overall_score["precision"]
|
176 |
+
# scores["overall_recall"] = overall_score["recall"]
|
177 |
+
# scores["overall_f1"] = overall_score["f1-score"]
|
178 |
+
# scores[f"overall_f{beta}"] = overall_score[f"f{beta}-score"]
|
179 |
+
# scores["overall_accuracy"] = accuracy_score(y_true=references, y_pred=predictions)
|
180 |
+
|
181 |
+
scores["overall"] = {
|
182 |
+
"precision": overall_score["precision"],
|
183 |
+
"recall": overall_score["recall"],
|
184 |
+
"f1-score": overall_score["f1-score"],
|
185 |
+
f"f{beta}-score": overall_score[f"f{beta}-score"],
|
186 |
+
"accuracy": accuracy_score(y_true=references, y_pred=predictions)
|
187 |
+
}
|
188 |
|
189 |
return scores
|