1
$\begingroup$

I know there is f1_score metric to get all types of F1 scores(micro, macro and weighted). But I want to be able to print micro averaged F1 score using classification_report of sklearn. By default, it seems to be returning weighted micro averaged F1. But I want the micro averaged F1 in the classification_report. How do I do that?

Also, I know the difference in formula between weighted and microaverages, but what are the instances where one would be preferred over other? And, what information do they convey?

$\endgroup$
1
  • 2
    $\begingroup$ The classification_report function isn't very configurable.. usually I just write my own functions for printing classification results - call the appropiate metric functions from sklearn.metrics and print their results.. $\endgroup$ – stmax Jul 15 '16 at 9:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.