The question is about the meaning of the average parameter in sklearn.metrics.f1_score.
As you can see from the code:
average=microsays 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=macrosays the function to compute f1 for each label, and returns the average without considering the proportion for each label in the dataset.average=weightedsays the function to compute f1 for each label, and returns the average considering the proportion for each label in the dataset.average=samplessays the function to compute f1 for each instance, and returns the average. Use it for multilabel classification.