danieldux commited on
Commit
8e5d27b
1 Parent(s): a7ce47d

Combine accuracy and hierarchical accurarcy print statements

Browse files
Files changed (1) hide show
  1. isco_hierarchical_accuracy.py +1 -2
isco_hierarchical_accuracy.py CHANGED
@@ -274,7 +274,6 @@ class ISCO_Hierarchical_Accuracy(evaluate.Metric):
274
  accuracy = sum(i == j for i, j in zip(predictions, references)) / len(
275
  predictions
276
  )
277
- print(f"Accuracy: {accuracy}")
278
 
279
  # Calculate hierarchical precision, recall and f-measure
280
  hierarchy = self.isco_hierarchy
@@ -283,7 +282,7 @@ class ISCO_Hierarchical_Accuracy(evaluate.Metric):
283
  )
284
  hF = self.hierarchical_f_measure(hP, hR)
285
  print(
286
- f"Hierarchical Precision: {hP}, Hierarchical Recall: {hR}, Hierarchical F-measure: {hF}"
287
  )
288
 
289
  return {
 
274
  accuracy = sum(i == j for i, j in zip(predictions, references)) / len(
275
  predictions
276
  )
 
277
 
278
  # Calculate hierarchical precision, recall and f-measure
279
  hierarchy = self.isco_hierarchy
 
282
  )
283
  hF = self.hierarchical_f_measure(hP, hR)
284
  print(
285
+ f"Accuracy: {accuracy}, Hierarchical Precision: {hP}, Hierarchical Recall: {hR}, Hierarchical F-measure: {hF}"
286
  )
287
 
288
  return {