Understanding and calculating the F1 score in ML