The question is about the meaning of the average
parameter in sklearn.metrics.f1_score
.
As you can see from the code:
average=micro
says the function to compute f1 by considering total true positives, false negatives and false positives (no matter of the prediction for each label in the dataset)average=macro
says the function to compute f1 for each label, and returns the average without considering the proportion for each label in the dataset.average=weighted
says the function to compute f1 for each label, and returns the average considering the proportion for each label in the dataset.average=samples
says the function to compute f1 for each instance, and returns the average. Use it for multilabel classification.