flairNLP / flair

A very simple framework for state-of-the-art Natural Language Processing (NLP)
https://flairnlp.github.io/flair/
Other
13.85k stars 2.09k forks source link

Error in macro F1 #486

Closed djstrong closed 5 years ago

djstrong commented 5 years ago

Probably there is error in calculation of macro F1. Flair is taking averages of class precisions and recalls and then calculates F1. As far as I know, it should be F1 calculated over classes and then averaged - it would be consistent with sklearn.metrics.f1_score(labels, predicitons, average='macro').

alanakbik commented 5 years ago

fixed in #521