The F1 score is also known as the F score or F measure of AI model’s test accuracy. It is calculated from the precision and recall of the test. Here
1) The precision is the number of correctly recognized positive results divided by the number of all positive results, including those not identified correctly.
2) The recall is the number of correctly identified positive results divided by the number of all samples that should have been identified as positive.
3) The F1 score is defined as the harmonic mean of the test’s precision and recall. The formula for F1 score is as below:
F1 score = 2 x precision x recall / (precision + recall)
From this formula,
i) A good F1 score means that you have high true positives and high true negatives. It means that the machine is correctly identifying real threats and not disturbing the users with false alarms.
ii) An F1 score is considered perfect when it’s 1 while the model is a total failure when it’s 0.
iii) F1 score is a better metric to evaluate the model on real-life classification problems and when imbalanced class distribution exists.
Study more about Evaluation at Evaluation Class 10