1

Is the F-score invariant to confusion matrix transposition?

In other words, if actual values are substituted with predicted values and vice-versa, would the F-score stay the same?

Denis Kulagin
  • 203
  • 1
  • 9

1 Answers1

1

This is the case exactly for $\beta=1$, i.e., for the $F1$ score, but not for general $F\beta$ scores.

To see this, use the following formulation of the $F\beta$ score:

$$ F\beta = \frac{(1+\beta^2)\cdot TP}{(1+\beta^2)\cdot TP + \beta^2\cdot FN+ FP}. $$

Transposing your confusion matrix will leave $TP$ (and $TN$) unchanged, and exchange $FP$ and $FN$. Thus, $F\beta$ will remain unchanged for all possible $FN$ and $FP$ values exactly for $\beta=1$.

(Note that the $F\beta$ score is not a good evaluation measure for the exact same reasons that accuracy, precision and recall alone aren't.)

Stephan Kolassa
  • 95,027
  • 13
  • 197
  • 357