The F1 score is a metric used in information retrieval (IR) to balance both precision and recall. It is the harmonic mean of precision and recall, providing a single score that reflects both the system's accuracy and its ability to retrieve relevant documents.
The F1 score is useful because it considers both false positives (irrelevant documents retrieved) and false negatives (relevant documents not retrieved), making it a good overall measure of an IR system’s performance. A high F1 score indicates that the system is both accurate and comprehensive.
The formula for the F1 score is: 2 * (Precision * Recall) / (Precision + Recall).