F1 is a metric that tries to take into account accuracy when classes are imbalanced by focusing on the accuracy of positive predictions and actual positive records. It does this by taking the harmonic mean of recall and precision = 2 * ((Precision * Recall)/(Precision + Recall)). It’s important to note that the more imbalanced a dataset it, the lower the F1 score is likely to be even with the same overall accuracy.