F1 score is the weighted average (harmonic mean) of precision and recall. The F1 score is calculated by the following formula:
F1 score = (2 x Precision x Recall)/(Precision + Recall)
The more the precision and recall metrics deviate from each other, the worse their harmonic mean (i.e. the F1 score).