how to calculate f1 score in python