F1 score
machine-learning
F1 score
For some binary classification problem where we are using $\hat{f}: A \rightarrow \{1, -1\}$ to predict $f: A \rightarrow \{1, -1\}$ for some testing data $T$ we define the F1 score to be the harmonic mean of precision and recall. That is
$$\mbox{F1}(\hat{f}, T) = \frac{2 \cdot \mbox{Precision}(\hat{f}, T) \cdot \mbox{Recall}(\hat{f}, T)}{\mbox{Precision}(\hat{f}, T) + \mbox{Recall}(\hat{f}, T)}.$$