0

So I am doing a document classification and the class of the documents can be from [1,2,3,...,10].

Now I feed the model one document, I get the output [1,4,7] but the ground truth is [1,5]. Now I want to calculate the f1 score using sklearn?

I can't find this format of f1 score calculation in sklearn documentation. How to do it then?

user27286
  • 486
  • 4
  • 11
  • 1
    Do https://stackoverflow.com/questions/9004172/precision-recall-for-multiclass-multilabel-classification or https://stackoverflow.com/questions/46732881/how-to-calculate-f1-score-for-multilabel-classification help? – mercator Jan 13 '21 at 17:25
  • @mercator Yes it helps. Maybe I should delete it? – user27286 Jan 13 '21 at 18:01
  • 1
    Does this answer your question? [Precision/recall for multiclass-multilabel classification](https://stackoverflow.com/questions/9004172/precision-recall-for-multiclass-multilabel-classification) – PV8 Jan 14 '21 at 11:51
  • @PV8.: This one is nice. Thanks – user27286 Jan 14 '21 at 23:36

0 Answers0